Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: mixpanel-react-native: MixpanelReactNative is null. #214

Closed
helians11 opened this issue Sep 28, 2023 · 13 comments
Closed

Error: mixpanel-react-native: MixpanelReactNative is null. #214

helians11 opened this issue Sep 28, 2023 · 13 comments

Comments

@helians11
Copy link

Error: mixpanel-react-native: MixpanelReactNative is null.

Still getting this error.
mixpanel-react-native: ^2.3.1
react-native: 0.71.8

import { Mixpanel } from 'mixpanel-react-native';

const mixpanel = new Mixpanel(projectToken, true);

@elvniv
Copy link

elvniv commented Oct 2, 2023

were you able to solve it? i am getting the same error and nothing online is helping

import { Mixpanel } from 'mixpanel-react-native';
import { MIXPANEL_TOKEN } from './env';

const trackAutomaticEvents = true;

export const mixpanel = new Mixpanel(MIXPANEL_TOKEN, trackAutomaticEvents);

@helians11
Copy link
Author

Nope... nothing is helping.

@elvniv
Copy link

elvniv commented Oct 3, 2023

its super annoying because they aren't responding either

@elvniv
Copy link

elvniv commented Oct 10, 2023

hey, any luck?

@OOCAZ
Copy link

OOCAZ commented Oct 17, 2023

same issue, not a clue what is going on, just using boilerplate docs, will see if I can get to the bottom of this quickly.

@elvniv
Copy link

elvniv commented Oct 17, 2023 via email

@OOCAZ
Copy link

OOCAZ commented Oct 17, 2023

@zihejia Any input?

@OOCAZ
Copy link

OOCAZ commented Oct 17, 2023

To update this issue I found a work around by just importing and using: https://www.npmjs.com/package/mixpanel-browser. However this is not direct react-native support...

But in the event of a work around just use that according to the guides @elvniv and @helians11, it should work for you.

@elvniv
Copy link

elvniv commented Oct 17, 2023 via email

@OOCAZ
Copy link

OOCAZ commented Oct 17, 2023

Adding additional documentation, I tried the last three previous version and those did not work, going to see if I can fork and fix after business hours.

@elvniv
Copy link

elvniv commented Oct 17, 2023 via email

@elvniv
Copy link

elvniv commented Oct 17, 2023 via email

@zihejia
Copy link
Collaborator

zihejia commented Mar 2, 2024

hi, it seems like you are trying to run it without the Native module, we have just released a beta version, v3.0.0-beta.1. This version allows you to enable JavaScript mode when initializing Mixpanel, which should work with your case. For more details and installation guidelines, please refer to the release notes at Mixpanel React Native v3.0.0-beta.1. I'm consolidating all the similar issues, please use #82 or open a new one for any feedback or issues in 3.0.0-beta versions 🙏

@zihejia zihejia closed this as completed Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants