1

Whenever I try to run the installation command of Navigation for React Native project to create Drawer I get the following errors, this is the command I tried

npm install @react-navigation/native

I get the following error

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR!   peer react@"*" from react-native-reanimated@1.9.0
npm ERR!   node_modules/react-native-reanimated
npm ERR!     react-native-reanimated@"~1.9.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"16.8.6" from react-native@0.60.6
npm ERR! node_modules/react-native
npm ERR!   react-native@"^0.60.5" from the root project
npm ERR!   peer react-native@"*" from react-native-reanimated@1.9.0
npm ERR!   node_modules/react-native-reanimated
npm ERR!     react-native-reanimated@"~1.9.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.

Can someone please help me out to fix this issue?

1 Answers1

0

Try npm install --save --legacy-peer-deps. If didn't worked then see:

Unable to resolve dependency tree error when installing npm packages

Hamza Waleed
  • 1,334
  • 10
  • 12