5

I get this error when i run npm run ios :

ERROR Invariant Violation: Your JavaScript code tried to access a native module that doesn't exist.

If you're trying to use a module that is not supported in Expo Go, you need to create a development build of your app. See https://docs.expo.dev/development/introduction/ for more info.

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.

I was programming this code on windows when everything was working but after I migrated to mac everything shut down. Iphone emulator

Natalie Sumbo
  • 71
  • 1
  • 5

1 Answers1

5

Did you recently attempt to add/use use a new module? I got this exact same error when I attempted to use @react-native-clipboard/clipboard when I should have instead been using expo-clipboard in my Expo app. Toggling to the correct module fixed the problem.

huwiler
  • 915
  • 9
  • 9