Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider error with @react-navigation/stack

When I am trying to use import {createStackNavigator} from @react-navigation/stack, it gives me an error

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

I have tried finding a solution, but nothing helps.

enter image description here

like image 661
Zeeshan Avatar asked Nov 20 '20 14:11

Zeeshan


People also ask

Which threw an exception invariant violation tried to register two views with the same name RNDateTimePicker?

ERROR Invariant Violation: Tried to register two views with the same name RNDateTimePicker 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.


1 Answers

Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider error with @react-navigation/stack

It means you have installed same extension multiple times.

Running "npm dedupe" command solved my problem.

or Yarn install (The dedupe command isn’t necessary. yarn install will already dedupe.)

like image 150
Kerim Senturk Avatar answered Oct 20 '22 00:10

Kerim Senturk