Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider
See original GitHub issueIssue Description
👋 Wondering if anyone has come across the error when working in a project with both this package and react-native-safe-area-context
installed:
[Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider, js engine: hermes
I’ve kept the issue description minimal because there’s a detailed post and solution posted in this StackOverflow post.
Additional Information
React Native version: “0.63.4” react-native-gifted-chat version: “^1.0.1”
Issue Analytics
- State:
- Created a year ago
- Reactions:8
- Comments:8
Top Results From Across the Web
Invariant Violation: Tried to register two views with the same ...
Invariant Violation : Tried to register two views with the same name RNCSafeAreaProvider error with @react-navigation/stack.
Read more >Invariant Violation: Tried to register two views with the ... - GitHub
In my case, I'm starting a new expo project and simply installing react navigation (following the official guide). I can see that simply ......
Read more >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 isn't...
Read more >Troubleshooting | React Navigation
I'm getting an error "Tried to register two views with the same name RNCSafeAreaProvider". This might occur if you have multiple versions of ......
Read more >ERROR Invariant Violation: Tried to register two views with the ...
ERROR Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider ERROR Invariant Violation: "main" has not been ...
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 FreeTop 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
Top GitHub Comments
Important note if you are building the project in Expo EAS: You need to create a hook before compiling the package to get rid of duplicate libraries, which is causing this error. This is accomplished by adding the following line in the “scripts” section of the package.json:
"eas-build-pre-install: "npm dedupe"
I hope it might help someone who has been frustrated with this problem as much as I have.
Submitted a PR here: https://github.com/FaridSafi/react-native-gifted-chat/pull/2234