3

can anyone help me with this error...im getting this error while installing the https://www.npmjs.com/package/react-native-razorpay v- 2.8.8 "react": "17.0.2", and "react-native": "0.67.1",

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: easylab@0.0.1 npm ERR! Found: react@17.0.2 npm ERR! node_modules/react npm ERR! react@"17.0.2" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.5.0" from react-native-razorpay@2.2.8 npm ERR! node_modules/react-native-razorpay npm ERR! react-native-razorpay@"*" 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 C:\Users\afsha\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\afsha\AppData\Local\npm-cache_logs\2022-02-12T08_50_50_495Z-debug.log

VLAZ
  • 26,331
  • 9
  • 49
  • 67
afshana zaman
  • 109
  • 1
  • 9
  • Does this answer your question? [Fix the upstream dependency conflict installing NPM packages](https://stackoverflow.com/questions/64936044/fix-the-upstream-dependency-conflict-installing-npm-packages) – Thanhal P A Feb 12 '22 at 09:05

1 Answers1

3

Automatically installing peer dependencies is an exciting new feature introduced in npm 7. In previous versions of npm (4-6), peer dependencies conflicts presented a warning that versions were not compatible, but would still install dependencies without an error. npm 7 will block installations if an upstream dependency conflict is present that cannot be automatically resolved.

You have the option to retry with --force to bypass the conflict or --legacy-peer-deps command to ignore peer dependencies entirely (this behavior is similar to versions 4-6)

Try install with

npm install react-native-razorpay --force

or

npm install react-native-razorpay --legacy-peer-deps
Thanhal P A
  • 4,097
  • 3
  • 18
  • 38