Tried to register two views with the same name RNCSafeAreaProvider

Viewed 2687

My project has developed in Reactnative Expo. When I start the app, I have got this error Tried to register two views with the same name RNCSafeAreaProvider. I have no idea about his bug. I have already removed and reinstalled node_modules and package.json, package-lock.json.

Kindly share your ideas. Thanks in Advance.

enter image description here

2 Answers

I also tried the solution offered in this Github issue but no luck.

Upgrading expo to ~40.0.0 and react-native-safe-area-context to 3.1.9 worked for me.

Here is how I fixed the issue on SDK 42.0.0:

Open your app route folder -> node_modules -> invariant -> browser.js

In the file browser.js, remove the [if condition code] (line number 28 to 46 )

My package.json file given below:

"expo": "~42.0.1",

"react": "16.13.1",

"react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",

"react-native-safe-area-context": "3.1.9",
Related