简体   繁体   中英

React-Native Expo app suddenly will not run because of Invariant Violation: 'main' has not been registered

Im using expo to build a react native app, and it has been working totally fine for days now. However, out of no where, it started to give me an Invariant Violation: 'main' has not been registered issue, and preventing me from building the app. Here is a photo. Error as well as AppEntry.js file

Also, I am relatively new to expo and react-native in general, so there are some things I don't understand still. I have searched everywhere for an answer, but nothing has worked.

quick solution that worked for me

  1. Delete your node_modules folder
  2. Delete your yarn.lock file (if you are using yarn)
  3. Run your installs again npm i or yarn (if you are using yarn)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM