Here's what I get after I try to install/uninstall packages:
(base) vivekrk@Viveks-MacBook-Air PUPA % npm install
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.18.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/native-stack
npm ERR! @react-navigation/native-stack@"^6.9.0" 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/vivekrk/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/vivekrk/.npm/_logs/2022-10-10T04_17_37_997Z-debug-0.log
Also I'm unable to run npx react-native start
This is happening after I installed few npm packages and were not useful so I uninstalled. But after that I couldn't install new packages.
Please resolve my problem!!
CodePudding user response:
Maybe you have dependency conflict, so you can try to run it with --force
Full command:
npm install --force
Or you can try to downgrade your nodejs version.