1
votes

I'm using react-native-gesture-handler within react-navigation and getting this error

null is not an object ( evaluating 'RNGestureHandlerModule.Direction')

Workspace file is automatically created with new React native version(0.60). And there is no libraries under libraries folder in Xcode project.

I created new project in react native and new project created with react-native version 0.60 automatically. Then I installed following dependencies

npm install —save react-navigation npm install —save react-native-gesture-handler After installing I am getting runtime error

null is not an object ( evaluating 'RNGestureHandlerModule.Direction')

I also tried to manually link react-native-gesture-handler dependencies with following steps

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 After that I am getting following errors

-> File not found -> File not found

Any suggestion for me to fix this?

3

3 Answers

4
votes

Did you try using react-native link react-native-gesture-handler? For me the solution was:

1) react-native link react-native-gesture-handler

2) cd ios

3) pod install

as now, pod is installed automatically into the project with react-native 0.60

4
votes

If you use RN > 0.60 you don't have to link react-native-gesture-handler manually as it supports autolinking.

For iOS

cd ios && pod install

For further info see issue #671

0
votes

Please try to link react-native-gesture-handler then fixed this error

try this command for link gesture-handler pluggin

react-native link react-native-gesture-handler