razorpay / react-native-razorpay

React Native wrapper for Razorpay's mobile SDKs
https://www.npmjs.com/package/react-native-razorpay
MIT License
122 stars 107 forks source link

react native razorpay won't install #352

Closed GTSConserve closed 2 years ago

GTSConserve commented 3 years ago

npm install --save react-native-razorpay

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: test_app_template@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.7
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 /Users/username/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2021-08-25T07_30_02_535Z-debug.log
vivekshindhe commented 3 years ago

@GTSConserve Looks like you are using node 16.7.0 which ships with npm 7.20.3. The library was built for the LTS Version of node which is 14.17.5 to reduce the crashes and maintain stability. Please downgrade your node version. this should get resolved.

GTSConserve commented 2 years ago

npm i react-native-razorpay --legacy-peer-deps I can fix this by adding legacy peer dependencies