Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

undefined is not an object after updating react-navigation to v3

i updated my react-native testproject yesterday to the new version of react-navigation v3, but now when i run the project i got this red error screen with the error Message

undefined is not an object (evaluating 'RNGestureHandlerModule.State')

enter image description here

The thing is i created a new and clean project after hours of cleaning node_modules folder and updating and so on but the error wont disappear. Today i uploaded the mini project on snack and everything is fine.. no errors and the mini test app runs almost perfectly -> https://snack.expo.io/@snak3/test-with-react-native

But on the normal "react-native run-ios" the error wont go away. I also uploaded the project to github: https://github.com/Rockatweb/test-react-native

Can anyone help me with this? I dont know what the problem is :/

like image 739
Der_D Avatar asked Mar 05 '23 01:03

Der_D


2 Answers

Solve this problem using below commands:

Step1: npm install --save react-native-gesture-handler

Step2: react-native link react-native-gesture-handler

Step3: Killall node -9

Step4: Delete app from simulator or imulator

Step5: Run app from Xcode or Android studio
like image 101
Brijesh Shiroya Avatar answered Apr 30 '23 06:04

Brijesh Shiroya


I have this issue too : helped for me :

Do this command in your project may help you :

react-native link react-native-gesture-handler
like image 23
MoHammaD ReZa DehGhani Avatar answered Apr 30 '23 07:04

MoHammaD ReZa DehGhani