New solution for locked issue #110: Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider
See original GitHub issueThe old solution: https://github.com/th3rdwave/react-native-safe-area-context/issues/110#issuecomment-668864576
New solution: just run expo install react-native-safe-area-context and then yarn or npm install. Should fix the problem by installing a newer version of react-native-safe-area-context (in my case, 3.1.4).
I would have updated the original issue, but it’s locked.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:14
Top Results From Across the Web
Invariant Violation: Tried to register two views with the same ...
It means you have installed same extension multiple times. Running "npm dedupe" command solved my problem. or Yarn install (The dedupe command ...
Read more >Invariant Violation: Tried to register two views with the same ...
[Solved]-Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider error with @react-navigation/stack-Reactjs.
Read more >Tried to register two views with the same name RNSVGSvgView
I use expo and have installed expo install react-native-svg, and deleted the old, I also removed the node modules and yarn lock and...
Read more >[Solved] Invariant Violation: Tried to register two views with the ...
How To Solve Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider Error ? Solution 1: Run this command ......
Read more >Tried To Register Two Views With The Same Name - ADocLib
New solution for locked issue #110: Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider #152. New solution for locked...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yup I had this issue as well, using Expo SDK 39 and react-navigation 4.x
It appears Expo comes with react-native-safe-area-context in it’s own node_modules folder, but react-navigation was complaining about
Unable to resolve "react-native-safe-area-context" from "node_modules/react-navigation-stack/lib/module/vendor/views/Stack/StackView.js"until it was installed with
expo install react-native-safe-area-context.This appeared to work fine with Android when running the app, even though there were now 2 versions present in the dependancy tree after checking with
npm list react-native-safe-area-context.iOS however gave this error described here when booting up the app:
Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider.For a quick and dirty solution for now, i’ve added
"postinstall": "rm -rf node_modules/expo/node_modules/react-native-safe-area-context"underscriptsin package.json to remove the Expo one, and now the app is running fine.I’m sure there must be a better solution out there by someone more versed in this than myself 😃
i tried everything, no one solution worked in IOS ( didn’t try yet in Android).
i’ve expo bare workflow, expo-cli 3.26.2 and “expo”: “~38.0.8”,
same issue:
please help, is 2 days i m stock!