0

I am getting this error every time I start up my Expo server. This app is using React Native and Realm (the issues started when I installed Realm). I have run Pod Install several times, without success. The full error messages I am getting are:

WARN Constants.platform.ios.model has been deprecated in favor of expo-device's Device.modelName property. This API will be removed in SDK 45. ERROR Error: Missing Realm constructor. Did you run "pod install"? Please see https://docs.mongodb.com/realm/sdk/react-native/install/ for troubleshooting, 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.

The issue is specifically occurring for iOS.

After reading several other Stack Overflow and Github posts, I tried the following, without success:

  • Installing Hermes
  • Reinstalling Node, NVM, and NPM
  • Running "Pod Install"
  • Downgrading and Upgrading the version of React Native
  • Uninstalling and reinstalling Node Module and package-lock.json
  • Modifying my index.js file to register component main.

None of these resolved the error - I have consistently received the same error messages when building my iOS bundle.

  • Welcome to SO. When asking questions there are a few things we need - in this case adding your podfile to the question, versions of 'stuff' you'reusing and platform is important. What's the development environment and what versions? Are you only using Pods to install realm? What version of Cocoapods is installed? Did you read this [question and answer](https://stackoverflow.com/questions/62649381/invariant-violation-main-has-not-been-registered)? – Jay Jul 19 '23 at 22:24
  • Please provide enough code so others can better understand or reproduce the problem. – Y. Gherbi Jul 20 '23 at 01:27

0 Answers0