Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failure to call AppRegistry.registerComponent

I created a new project using react-native init Wevaha,after that I excute it work's properly then I modified sample app based on my requirement again run it works properly but the next time while running the app I am gettingthe error like

' Application Wevaha has not been registered.This is either due to a require() error during intialization or failure to call 

AppRegistry.registerComponent'

The screen shot attached below please find it enter image description here

like image 411
vasavi Avatar asked Feb 17 '16 06:02

vasavi


People also ask

What is AppRegistry registerComponent in react native?

AppRegistry is the JS entry point to running all React Native apps. App root components should register themselves with AppRegistry. registerComponent , then the native system can load the bundle for the app and then actually run the app when it's ready by invoking AppRegistry. runApplication .

Has not been registered this can happen if?

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.

What is index JS in react native?

index. js is the starting point for React Native applications, and it is always required.


1 Answers

It is likely that you already have another React Native packager server running for another app or that the app name in AppDelegate.m and your index.js is not the same.

Try closing all terminal windows, double check the value of moduleName and run the project again.

like image 101
oblador Avatar answered Sep 28 '22 03:09

oblador



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!