Home > Back-end >  react native error while installing react-native-razorpay
react native error while installing react-native-razorpay

Time:02-12

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: [email protected] npm ERR! Found: [email protected] 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 [email protected] 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

CodePudding user response:

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
  • Related