Null is not an object (evaluating ‘_RNGestureHandlerModule…

Last updated on March 19, 2021 A Goodman Loading... Post a comment

When developing a new React Native project on my Mac, I fall into a problem when running npm run ios. I’m using React Navigation 5 and React Native 0.62.2 (you can check out my dependencies below).

The error message:

Null is not an object (evaluating ‘_RNGestureHandlerModule.default.Direction’)

My dependencies:

"@react-native-community/masked-view": "^0.1.10",
    "@react-navigation/native": "^5.5.0",
    "@react-navigation/stack": "^5.4.1",
    "react": "16.11.0",
    "react-native": "0.62.2",
    "react-native-gesture-handler": "^1.6.1",
    "react-native-reanimated": "^1.9.0",
    "react-native-safe-area-context": "^3.0.2",
    "react-native-screens": "^2.8.0"

Solution

The reason that causes the above error is that I forget to install the pods. After executing the follow command and restart my app (not reload), it works as normal:

npx pod-install ios

If you still face this error, try:

npx react-native link

Happy coding 🙂

Related Articles

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments