react-native-maps-directions icon indicating copy to clipboard operation
react-native-maps-directions copied to clipboard

Invariant Violation: `new NativeEventEmitter()` requires a non-null argument.

Open StasTwiztah opened this issue 2 years ago • 0 comments

I'm using "react-native-maps-directions": "^1.8.0", "react-native": "0.68.2", "expo": "^45.0.6",

Then

useEffect(() => { // TODO: check geolocation permission Geolocation.watchPosition( (position) => { console.log(position); }, (error) => { // See error code charts below. console.log(error.code, error.message); } ); }, []);

And getting

Invariant Violation: new NativeEventEmitter() requires a non-null argument. at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:4 in reportException at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError at node_modules/metro-runtime/src/polyfills/require.js:203:6 in guardedLoadModule at http://192.168.10.176:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:179402:3 in global code

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. at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:4 in reportException at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError

StasTwiztah avatar Jun 25 '22 22:06 StasTwiztah