question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Issue 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:closed
  • Created a year ago
  • Reactions:8
  • Comments:8

github_iconTop GitHub Comments

3reactions
julioxuscommented, Aug 24, 2022

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.

1reaction
monahanscommented, Jul 6, 2022
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found