94 words
1 minute
Undefined is not an object (evaluating 'RNGestureHandlerModule.State')

This happens when you install and use React Navigation without Expo. Ever since React Navigation 3 came out it needs react-native-gesture-handler in order to work. This error usually pops up if Gesture Handler isn’t linked properly. Follows these steps to fix it.

  1. remove node_modules and package-lock.json
  2. cd to ios and clear your pods and build folder
  3. cd back to your root project directory
  4. npm install
  5. npm install —save react-navigation
  6. npm install —save react-native-gesture-handler
  7. react-native link
  8. install all modules with npm install
  9. cd back to ios
  10. pod install
  11. cd back to root
  12. npm run ios

After these steps your project should start to build and run properly again.

Undefined is not an object (evaluating 'RNGestureHandlerModule.State')
https://edwardbeazer.com/posts/undefined-is-not-an-object-evaluating-rngesturehandlermodule-state/
Author
Edward Beazer
Published at
2019-01-06