I am creating an app using react native with a friend, I’m using expo as well as npm, after I pulled from his github repo last time and I tried to run npm install I got this error
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/expo npm ERR! expo@"^51.0.6" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer expo@"^49.0.7 || ^50.0.0-0" from @expo/[email protected] npm ERR! node_modules/@expo/webpack-config npm ERR! @expo/webpack-config@"^19.0.1" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! C:UsersmrdarkAppDataLocalnpm-cache_logs2024-05-17T18_26_41_483Z-eresolve-report.txt
my npm version is 10.5.2
node version is v20.13.1
and here is my package.json file
{ "name": "coolculina", "version": "1.0.0", "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web" }, "dependencies": { "@expo/metro-runtime": "~3.2.1", "@expo/webpack-config": "^19.0.1", "@fortawesome/fontawesome-svg-core": "^6.5.2", "@react-native-community/slider": "^4.5.2", "@react-native-firebase/app": "^19.1.1", "@react-native-firebase/storage": "^19.2.2", "@react-native-google-signin/google-signin": "^10.1.2", "@react-native-picker/picker": "^2.7.5", "@react-navigation/bottom-tabs": "^6.5.20", "@react-navigation/drawer": "^6.6.15", "@react-navigation/material-bottom-tabs": "^6.2.28", "@react-navigation/native": "^6.1.17", "@react-navigation/native-stack": "^6.9.26", "axios": "^1.6.8", "crypto": "^1.0.1", "expo": "^51.0.6", "expo-asset": "~10.0.6", "expo-auth-session": "~5.5.2", "expo-blur": "~13.0.2", "expo-camera": "~15.0.8", "expo-constants": "~16.0.1", "expo-crypto": "~13.0.2", "expo-google-sign-in": "^11.0.0", "expo-image-manipulator": "~12.0.5", "expo-image-picker": "~15.0.4", "expo-random": "~14.0.1", "expo-status-bar": "~1.12.1", "expo-web-browser": "~13.0.3", "firebase": "^10.10.0", "formik": "^2.4.5", "metro": "^0.80.8", "metro-cache": "^0.80.8", "metro-config": "^0.80.8", "native-base": "^3.4.28", "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.74.1", "react-native-camera": "^4.2.1", "react-native-get-random-values": "^1.11.0", "react-native-image-crop-picker": "^0.40.3", "react-native-image-crop-tools": "^1.6.4", "react-native-image-picker": "^7.1.2", "react-native-paper": "^5.12.3", "react-native-permissions": "^4.1.5", "react-native-safe-area-context": "4.10.1", "react-native-screens": "3.31.1", "react-native-vector-icons": "^10.1.0", "react-native-web": "~0.19.6", "react-redux": "^9.1.1", "redux": "^5.0.1", "whatwg-url": "^14.0.0", "yup": "^1.4.0" }, "devDependencies": { "@babel/core": "^7.20.0" }, "private": true }
I have tried to upgrade and downgrade everything, I also reinstalled node, still I can’t run npm install
I have also tried using yarn
yet nothing worked. I also tried deleting the package-lock.json
and node modul folder. I can’t even install react-native-paper
I also tried npm i --legacy-peer-deps
yet when I wanna install a new dependency I keep getting errors in console.
AHMED SEDKI NOMAN ALI is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.