Repair legacy project with dependency issues

I started expo react native project 2 years ago, now I’m trying to get back into it.
There are dependency problems. Below are the details:


  "main": "node_modules/expo/AppEntry.js",
  "name": "rootPath",
  "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",
    "@react-navigation/native": "^5.1.4",
    "@react-navigation/stack": "^5.2.9",
    "expo": "~36.0.0",
    "firebase": "^7.14.4",
    "react": "~16.9.0",
    "react-dom": "~16.9.0",
    "react-native": "",
    "react-native-dialog-input": "^1.0.7",
    "react-native-gesture-handler": "~1.5.0",
    "react-native-material-menu": "^1.1.3",
    "react-native-modal": "^11.5.6",
    "react-native-reanimated": "~1.4.0",
    "react-native-safe-area-context": "0.6.0",
    "react-native-screens": "2.0.0-alpha.12",
    "react-native-table-component": "^1.2.1",
    "react-native-vector-icons": "^6.6.0",
    "react-native-web": "~0.11.7",
    "react-navigation": "^4.3.7",
    "react-navigation-stack": "^2.3.11",
    "react-sweet-state": "^2.3.1",
    "short-unique-id": "^3.0.0",
    "": "^2.1.1"
  "devDependencies": {
    "babel-preset-expo": "~8.0.0",
    "@babel/core": "^7.0.0"
  "private": true


  "expo": {
    "name": "POKER Sini",
    "slug": "poker-sini",
    "privacy": "public",
    "sdkVersion": "36.0.0",
    "platforms": [
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/27-icon.png",
    "splash": {
      "image": "./assets/27_500-515.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    "updates": {
      "fallbackToCacheTimeout": 0
    "assetBundlePatterns": [
    "android": {
      "package": "ravid.cohen_poker_sini",
      "versionCode": 1

ERROR: (while npm install)
unable to resolve dependency tree

Hi @ravid123

npm should have given you some sort of reason for the error. If I were to guess it might be that you need to specify --legacy-peer-deps when you run npm install as a workaround for issues with peer dependencies. You might want/need to create a .npmrc file in your project containing legacy-peer-deps=true to avoid similar issues when running expo upgrade, expo install or eas build.

But there are some things you’ll need to update too. I think after you’re able to install the dependencies, try upgrading to Expo SDK 45 (which is the oldest version still supported by Expo Go). You could try upgrading to an older version and creating a dev build, but it’s probably worth at least trying to jump straight to SDK 45. If you run into problems you can try a more incremental approach.

expo-cli upgrade 45

Dependencies to update:

  • Replace @react-native-community/masked-view with @react-native-masked-view/masked-view and update your code to reference the latter.
  • firebase: I’ve not used firebase before. Check the Expo docs, but I think you’re OK there. The expo-cli upgrade command should upgrade it to the right version.
  • You’ve got a mixture of different React Navigation versions. You’ll probably need to update them to at least version 5.
  • Remove babel-preset-expo and update @babel/core to "^7.12.9"

I haven’t looked into the rest of them.

1 Like

Thank you very much! Finally it works.
the @react-native-masked-view/masked-view package fix you suggested was the fix. Then upgrading expo worked.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.