razorpay / react-native-razorpay

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

Unable to install custom ui with React 18 #428

Closed sandarshnaroju closed 1 year ago

sandarshnaroju commented 1 year ago

Description

Unable to install react-native-customui with React 18.

Razorpay Package Version :

Open Package.json. > Copy react-native-razorpay version here.

Xcode Version (iOS) :

Open Xcode > Go to About Xcode > copy the Xcode version here.

Razorpay-pod version (iOS) :

Go to your project path > Go to folder named ios > open 'podfile.lock' file > search for 'razorpay-pod' > copy the line here

Java and Gradle Version (android) :

Specify your Java and Gradle version.

What you did:

using npm install react-native-customui --save gives errors

What happened:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: xxxx@0.0.1
npm ERR! Found: react@18.1.0
npm ERR! node_modules/react
npm ERR!   react@"18.1.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.1" from react-native-customui@2.2.2
npm ERR! node_modules/react-native-customui
npm ERR!   react-native-customui@"*" 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.

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Create a new react-native app with React@18.1.0 and run it.
  2. Try to install npm install react-native-customui --save

Suggested solution:

Please update customui to react 18.

Code example, screenshot, or link to a repository:

Please provide a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

rifad4u commented 1 year ago

Try installing it by npm install react-native-customui --legacy-peer-deps

sandarshnaroju commented 1 year ago

yeah, it worked.