0

When I try to run my react native expo app in iOS using npm start , I get the following error in the require.js file:
the screenshot of the exception

I tried removing and readding the node_modules folder , but it didn't work. Thanks.

I also get the following errors together with this error. I don't know if they are related.

 ERROR  TypeError: Object.defineProperty is not a function (it is undefined), 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
1
  • Please provide enough code so others can better understand or reproduce the problem. Commented Aug 23, 2023 at 22:15

1 Answer 1

0

I solved the problem via tracing the "Call Stack" in the error screen in the simulator. It shows what scripts produce the problem.

My problem was related to an import. Yours can be different but don't forget to look at the "Call Stack" in the error screen of your simulator.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.