bramus / react-native-maps-directions

Directions Component for `react-native-maps`
MIT License
1.25k stars 198 forks source link

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

Open StasTwiztah opened 2 years ago

StasTwiztah commented 2 years ago

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: