1

I am trying to run on Android simulator, and Expo showed like:

unable to resolve "react-native-gesture-handler" from "node_modules/@react-navigation/native/src/Scrollables.js"

I did the below 2 things according to https://reactnavigation.org/docs/en/getting-started.html:

npm install react-navigation

expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view

And my package.json is like this below.

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@react-native-community/masked-view": "0.1.5",
    "expo": "~36.0.0",
    "firebase": "^7.8.0",
    "react": "~16.9.0",
    "react-dom": "~16.9.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
    "react-native-gesture-handler": "~1.5.0",
    "react-native-reanimated": "~1.4.0",
    "react-native-safe-area-context": "0.6.0",
    "react-native-screens": "2.0.0-alpha.12",
    "react-native-web": "~0.11.7",
    "react-navigation": "^4.1.0"
  },
  "devDependencies": {
    "babel-preset-expo": "~8.0.0",
    "@babel/core": "^7.0.0"
  },
  "private": true
}

Please advise how to solve this issue. Thanks.

sauceishere
  • 326
  • 5
  • 15

2 Answers2

1

use

npm i react-native-gesture-handler 
Dharman
  • 30,962
  • 25
  • 85
  • 135
Ali Awais
  • 31
  • 2
1

Follow these commands: npm install jetifier Then run: npx jetifier

Elroy Toscano
  • 362
  • 1
  • 4
  • 11