Kinda Code
Home/React Native/Null is not an object (evaluating ‘_RNGestureHandlerModule…

Null is not an object (evaluating ‘_RNGestureHandlerModule…

Last updated: March 15, 2022

When developing a React Native project on my Mac, I fall into a problem when running npm run ios. My project is using some third-party libraries.

The Error

The message:

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

Screenshot:

The Solution

The reason that causes the above error is that I forget to install the pods. To solve this, run the following command:

npx pod-install ios

If you still face this error, try:

npx react-native link

Finally, restart the metro bundler as well as the iOS simulator to make sure it works fine.

That’s it. Further reading:

You can also check our React topic page and React Native topic page for the latest tutorials and examples.

Related Articles