0

I know this is a duplicate of many other questions, but I have followed the setup tutorial at: https://reactnavigation.org/docs/en/getting-started.html#installation

I've tried a bunch of stack overflow answers and most of them look something like this:

remove node_modules and package-lock.json
npm install
npm install --save react-navigation
npm install --save react-native-gesture-handler
react-native link

taken from https://stackoverflow.com/a/53370597/8512499

The interesting thing is that the projects works fine if I start it up from inside Xcode, but if I run react-native run-ios it fails.

Any suggestions would be greatly appreciated!

This is the error I'm getting:

Undefined is not an object (evaluating 'RNGestureHandlerModule.State')

enter image description here

Philip Aarseth
  • 301
  • 4
  • 16
  • Can you add some code where the import statement lives? – Ashwin Mothilal Jan 20 '19 at 12:05
  • if you mean the imports on my navigator, its: import React from 'react'; import { Platform } from 'react-native'; import { createBottomTabNavigator, createAppContainer, createStackNavigator } from 'react-navigation'; import Ionicons from 'react-native-vector-icons/Ionicons'; – Philip Aarseth Jan 20 '19 at 12:49
  • Have you tried linking react-native-gesturehandler manually? – Ashwin Mothilal Jan 20 '19 at 13:58

1 Answers1

0

I still faced the issue

On closer look and reading other documentation i found at times pods are the real issue.

This I how It got it working

delete the app from the simulator

 run on terminal -> react-native link

Goto IOS folder

 run on terminal -> pod install 
vishu2124
  • 4,243
  • 2
  • 14
  • 10