Akram
Akram

Reputation: 97

null is not an object (evaluating '_RNGestureHandlerModule.default.Direction')

I followed the instructions for installing react-navigation 3.x from their website. I re-built the app and even created new project and followed the instructions again. but still getting the same above error. any idea?

edit: I am running the app react-native cli using react-native run-ios. I am not using Xcode

error screenshot

Upvotes: 4

Views: 4984

Answers (3)

James
James

Reputation: 121

I had this and solved by updating the pod spec and then rebuilding in Xcode.

# from project root
cd ios
pod update

Then re-run from Xcode

Upvotes: 1

Harsh Panchal
Harsh Panchal

Reputation: 836

Looks like this is to do with the new autolinking feature in RN 0.60.

To fix for now just add the following podspec for RNGesureHandler to ios/Podfile

pod 'RNGestureHandler', :podspec => '../node_modules/react-native-gesture-handler/RNGestureHandler.podspec'

Then in the ios directory run pod install to install it.

Upvotes: 4

oklas
oklas

Reputation: 8220

As mentioned here do the following:

  • Right Click Libraries "Add Files to Project"
  • /node_modules/react-native-gesture-handlers/ios/RNGestureHandler.xcodeproj
  • Go to build phases and add libRNGestureHandler.a
  • Run

Upvotes: 3

Related Questions