th3rdwave / react-native-safe-area-context

A flexible way to handle safe area insets in JS. Also works on Android and Web!
MIT License
2.09k stars 191 forks source link

Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider #368

Closed WaseemAhmed645 closed 1 year ago

WaseemAhmed645 commented 1 year ago

I am using a package name "react-native-rainbow-module" in package json for using some feature we make a copy of it and use in our src folder at front outside the node-modules. now the basic issue i want to discuss it this package is using "react-native-safe-area-context": "^4.4.1". this version and same version we are using in our project. we are using react-native-rainbow-module since last 2 year but at this library "react-native-safe-area-context": "^4.4.1", is newly found in their package json and same library we are using in our project and i am not able to run the project my project is compile sucessfully but at the end it will show the error.

ERROR Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

Kindly do some help how i can get rid of this error what i can do now

jacobp100 commented 1 year ago

You have two copies of this library in your node_modules. If you're on yarn, you can run yarn why react-native-safe-area-context. Figure out what's causing two copies to be included to fix the error you're seeing