React-Native: Application has not been registered error
I guess it is an error caused by not matching name of project and your registered component.
You have inited project with one name, i.e.
react-native init AwesomeApp
But in your index.ios.js file you register other component
AppRegistry.registerComponent('Bananas', () => Bananas);
When it must be
AppRegistry.registerComponent('AwesomeApp', () => Bananas);
If your component name does match, ensure you don't have any other react-native/node process running in another terminal.
Invariant Violation: "main" has not been registered While running react-native app
The meaningful exception that you are seeing here is:
Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider
The "main" has not been registered
is a red herring, it only happened because the other error.
The RNCSafeAreaProvider
exception is happening because you have multiple copies of react-native-safe-area-context
in your app. You may be using a library that includes it as a dependency in addition to having it installed in your app. If you use yarn, you can run yarn why react-native-safe-area-context
to see where it's coming from. Try running expo install react-native-safe-area-context
and if that doesn't help you can use yarn resolutions to override the version used by the package that depends on it.
Application main has not been registered
The following solution worked:
AppRegistry.registerComponent('main',() => App);
Credits: Rishav Kumar
(Cannot you people just reply to mark as solve ?)
Invariant violation: "tesApp" has not been registered
Please destroy your metro bundler and try to run your app again it will work.
Related Topics
Javascript Function Not Defined Error (But It Is Defined)
How to Specify Multiple Conditions in an If Statement in JavaScript
Retaining the Textbox Values Even After Refresh
Check If Json Response Data Is Empty
Vuejs Reload If in the Same Route
How to Pass 3 Parameters in Onclick Function .The Parameters Are Inside PHP Tag
Group By, and Sum, and Generate an Object for Each Array in JavaScript
How to Get a Div Element from an External Webpage in HTML File
Fetch - Missing Boundary in Multipart/Form-Data Post
Open Link in a Window Using Script (Google Sheet)
Regex to Replace Everything Except Numbers and a Decimal Point
Check If a Number Has a Decimal Place/Is a Whole Number
Add Two Numbers and Display Result in Textbox With JavaScript
Keep Selected Dropdown Result After Refreshing Page, Jquery
Onclick JavaScript to Make Browser Go Back to Previous Page
How to Change the Font Color, Font Size, and Button Color in React