razorpay / react-native-razorpay

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

Could not resolve dependency react-native@"^0.57.1" from react-native-razorpay@2.2.2 #313

Closed ProiOSDeveloper closed 3 years ago

ProiOSDeveloper commented 3 years ago

Description

Unable to resolve dependency while installing the latest version @2.2.2 in a react-native 0.63.0 project.

Razorpay Package Version :

2.2.2

Xcode Version (iOS) :

12.3

Razorpay-pod version (iOS) :

Not able to resolve dependency so pod installation never happened.

Java and Gradle Version (android) :

Issue not related to java.

What you did:

npm install react-native-razorpay@2.2.2

What happened:

Could not resolve dependency: peer react-native@"^0.57.1" from react-native-razorpay@2.2.2

Steps To Reproduce

I tried updating razor-pay version from 2.2.1 to 2.2.2 so ran following command: npm install react-native-razorpay@2.2.2 But this command failed with above mentioned error.

Tried repeating the same for a fresh new project. This time using: npm install react-native-razorpay but Got the same error.

Screenshot:

Screen Shot 2021-01-08 at 11 56 37 AM

Nautiyalsachin commented 3 years ago

Hi @ProiOSDeveloper, If you are trying to use react@0.57 then follow this readme section.. Also, it would really help if you can share the logs after running the project in Xcode. This will help us to debug this issue.

ProiOSDeveloper commented 3 years ago

I am not trying to use react@0.57, I am using react@0.63, but I think you have used react@0.57 in peer dependency (which was dev dependency in previous versions of razorpay). Not sure why this change was made on your end, but I guess this is breaking the dependency resolution. It won't let me install the node module, forget about running in Xcode and deriving logs.

Nautiyalsachin commented 3 years ago

@ProiOSDeveloper As per this article, peer dependency won't affect the current implementation. You can ignore the warning, as said in the above article. We will modify this for the future releases. So that this won't affect in future. Let me know if you still faces any issues.

ProiOSDeveloper commented 3 years ago

@Nautiyalsachin This is not a warning, its an error. Please try creating a fresh react native project and run: npm install react-native-razorpay you would be able to reproduce it.

kartavyaparekh96 commented 3 years ago

+1

Nautiyalsachin commented 3 years ago

@ProiOSDeveloper, @kartavyaparekh96: I am not able to reproduce this issue here. Can you please share a sample app where you can demonstrate the same this?

kartavyaparekh96 commented 3 years ago

this is the issue when npm install react-native-razorpay command run in console. when install this dependency error throws like above.

rishabh72 commented 3 years ago

I also had same issue and I installed sdk using `

npm install react-native-razorpay --force command

`

sudheepkr commented 3 years ago

use this comment it will work npm install --save --legacy-peer-deps then npm install react-native-razorpay --save

azhagarsparks commented 2 years ago

use this comment it will work npm install --save --legacy-peer-deps then npm install react-native-razorpay --save --legacy-peer-deps