RevenueCat / react-native-purchases

React Native in-app purchases and subscriptions made easy. Support for iOS and Android.
https://www.revenuecat.com
MIT License
744 stars 80 forks source link

Invariant Violation: `new NativeEventEmitter()` Expo 51 #1087

Open maamalama opened 1 week ago

maamalama commented 1 week ago

Hi! I'm getting follow error on RN Expo 51. How I can fix that?

Invariant Violation: `new NativeEventEmitter()` requires a non-null argument., js engine: hermes
 ERROR  Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes

simulator_screenshot_A301373E-F9D2-4C88-91B6-CA371F794BC1

RCGitBot commented 1 week ago

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

vegaro commented 1 week ago

This error is normally due to a wrong installation of the plugin. I would suggest you clean metro caches, re-install your node modules and make sure you run pod install in your iOS folder since that can sometimes be the culprit

If that doesn't help, do you mind sharing the output you see when installing the plugin, and your Podfile.lock.

Thank you