Skip to content

Bug: Cannot read property 'v4' of undefined #311

@FabianUntermoser

Description

@FabianUntermoser

Current Behaviour
Mixpanel uses the uuid package to generate a random deviceId. It relies on the default v4 import to exist. Newer versions of uuid do not have that import.

Suggested Solution
Use new way of importing v4.

import { v4 as uuid } from "uuid";

Additonal Context

Original Error in my react native expo app.
Image
File: /mixpanel-react-native/javascript/mixpanel-persistent.js

Implementation Details
@jaredmixpanel introduced using uuid in this commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions