i need to upgrade react native version in this project, but running npm install while doing project setup give lots of dependency errors, how should i move ahead with this, need a solution. Thanks in advance.enter image description here
Mac-mini xxxx % npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react-native-screens
npm ERR! react-native-screens@"^3.6.0" from the root project
npm ERR! peer react-native-screens@">= 3.0.0" from @react-navigation/[email protected]
npm ERR! node_modules/@react-navigation/drawer
npm ERR! @react-navigation/drawer@"^6.1.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-screens@"^1.0.0 || ^1.0.0-alpha" from [email protected]
npm ERR! node_modules/react-navigation-drawer
npm ERR! react-navigation-drawer@"1.4.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react-native-screens
npm ERR! peer react-native-screens@"^1.0.0 || ^1.0.0-alpha" from [email protected]
npm ERR! node_modules/react-navigation-drawer
npm ERR! react-navigation-drawer@"1.4.0" 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! See /Users/xxxxx/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
i have tried to run npm i --legacy-peer-deps, but project does not works, obviously. now i am resolving each dependency one by one, it seems i will not be able to complete it ever. Need some suggestion on how to move forward with this.
here is my package.json
{
"name": "abc”,
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.17.4",
"@react-native-community/cameraroll": "^4.1.2",
"@react-native-community/netinfo": "^6.0.0",
"@react-native-community/push-notification-ios": "^1.10.1",
"@react-native-firebase/app": "^12.8.0",
"@react-native-firebase/messaging": "^12.8.0",
"@react-navigation/drawer": "^6.1.4",
"axios": "^0.21.1",
"date-fns": "^2.28.0",
"deprecated-react-native-listview": "0.0.7",
"moment": "^2.29.1",
"native-base": "^2.12.2",
"react": "17.0.2",
"react-native": "0.65",
"react-native-calendar-events": "^2.2.0",
"react-native-calendars": "^1.1262.0",
"react-native-datepicker": "^1.7.2",
"react-native-gesture-handler": "^1.10.3",
"react-native-hyperlink": "0.0.19",
"react-native-image-picker": "^4.0.3",
"react-native-image-viewing": "^0.2.0",
"react-native-keyboard-aware-scroll-view": "^0.5.0",
"react-native-loading-spinner-overlay": "^2.0.0",
"react-native-modal": "^11.10.0",
"react-native-modal-overlay": "^1.3.1",
"react-native-push-notification": "^8.1.0",
"react-native-reanimated": "^2.3.0-alpha.2",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.6.0",
"react-native-splash-screen": "^3.2.0",
"react-native-svg": "^12.1.1",
"react-native-version-info": "^1.1.1",
"react-navigation": "^4.4.4",
"react-navigation-animated-switch": "^0.6.4",
"react-navigation-drawer": "1.4.0",
"react-navigation-stack": "1.7.3",
"react-navigation-tabs": "1.2.0",
"react-redux": "^7.2.4",
"redux": "^4.1.0",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"rn-fetch-blob": "^0.12.0",
"styled-components": "^5.3.0",
"styled-system": "^5.1.5",
"teaset": "^0.7.5"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/runtime": "^7.15.3",
"@react-native-community/eslint-config": "^3.0.0",
"babel-jest": "^27.0.6",
"eslint": "^7.32.0",
"jest": "^27.0.6",
"metro-react-native-babel-preset": "^0.66.2",
"react-native-codegen": "^0.0.7",
"react-test-renderer": "17.0.2"
},
"jest": {
"preset": "react-native"
},
"rnpm": {
"assets": [
"./src/assests/fonts/"
]
}
}
npm install --save --legacy-peer-deps