Expo React Native Invariant Violation: "main" has not been registered

Viewed 299

I started getting this error today

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.

I read in this thread Invariant Violation: "main" has not been registered While running react-native app that might be because i have multiple versions of react native safe area content.

I ran npm why react-native-safe-area-content and this is what i got

react-native-safe-area-context@4.2.4 node_modules/react-native-safe-area-context
react-native-safe-area-context@"4.2.4" from the root project peer react-native-safe-area-context@">= 3.0.0" from @react-navigation/elements@1.3.3
node_modules/@react-navigation/elements @react-navigation/elements@"^1.3.3" from @react-navigation/native-stack@6.6.2 node_modules/@react-navigation/native-stack @react-navigation/native-stack@"^6.6.2" from the root project @react-navigation/elements@"^1.3.3" from @react-navigation/stack@6.2.1 node_modules/@react-navigation/stack @react-navigation/stack@"^6.2.1" from the root project peer react-native-safe-area-context@">= 3.0.0" from @react-navigation/native-stack@6.6.2
node_modules/@react-navigation/native-stack @react-navigation/native-stack@"^6.6.2" from the root project peer react-native-safe-area-context@">= 3.0.0" from @react-navigation/stack@6.2.1 node_modules/@react-navigation/stack @react-navigation/stack@"^6.2.1" from the root project

But i don't know what to do now, how should i proceed?

0 Answers
Related