Luehang / react-paypal-button-v2

An easy and simple to use React button component to implement PayPal Checkout with Smart Payment Buttons V2 (Version 2).
https://luehangs.site/lue_hang/projects/react-paypal-button-v2
MIT License
274 stars 81 forks source link

[BUG] #89

Closed YousifAbozid closed 1 year ago

YousifAbozid commented 3 years ago

To Do First

Software Package Version:

hey guys, I used this command just right now npm install react-paypal-button-v2 --save and I get an error.

Describe the bug

the error is this

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: e-commerce-front-end@0.1.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^0.14.6 || 15.x.x || 16.x.x" from react-paypal-button-v2@2.6.2
npm ERR! node_modules/react-paypal-button-v2
npm ERR!   react-paypal-button-v2@"*" 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\Yousif\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\Yousif\AppData\Local\npm-cache\_logs\2020-12-05T00_46_12_455Z-debug.log

To Reproduce

I guess I can't use this package with my current version of react as I'm using version 17.0.1 , and I tried to install this package again with --force flag and it's been installed with a warning, it said

npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@17.0.1
npm WARN node_modules/react
npm WARN   react@"^17.0.1" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^0.14.6 || 15.x.x || 16.x.x" from react-paypal-button-v2@2.6.2
npm WARN node_modules/react-paypal-button-v2
npm WARN   react-paypal-button-v2@"*" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react-dom@17.0.1
npm WARN node_modules/react-dom
npm WARN   react-dom@"^17.0.1" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^0.14.6 || 15.x.x || 16.x.x" from react-paypal-button-v2@2.6.2
npm WARN node_modules/react-paypal-button-v2
npm WARN   react-paypal-button-v2@"*" from the root project

added 6 packages, and audited 1974 packages in 15s

found 0 vulnerabilities

but I guess this maybe not the perfect solution for my problem, so what should I do to be able to use this package without all this scary errors and warnings?

Expected behavior

hopefully to install correctly without any errors or warnings

Screenshots

no need because I pasted the whole error from my console

Desktop (please complete the following information):

Additional context that's it, there is nothing else to say.

klleroy commented 3 years ago

I too am having this problem.

YousifAbozid commented 3 years ago

We are not alone in this situation, there is a lot of people complaining about this problem, and guess what? no one care about that, also I tried to add --force flag to install the package and trying to use it the process never complete, there is something wrong in PayPal and I can't do anything about it, so sad :(

klleroy commented 3 years ago

I'm thinking it's an npm issue rather than PayPal. I can install via yarn just fine.

YousifAbozid commented 3 years ago

Yeah, you are right it's npm issue, but actually I installed it anyway and use it in my payment component in my app and the payment doesn't complete for unknown reason, that's why I said that there is something wrong in PayPal, anyway I hope that anyone can solve this problem.

GBrachetta commented 3 years ago

I'm having exactly the same issue. Frustrating.

YousifAbozid commented 3 years ago

And till now after 2 months no one answer or offered to help.

klleroy commented 3 years ago

@YousifAbozid 100%. I think @Luehang has abandoned this repo.

GBrachetta commented 3 years ago

Apparently a new release (2.6.3) came up ½ hour ago and now I am able to install with npm.

ivanoats commented 1 year ago

FYI, in the future, or for react 18 currently, you can get around this with npm install [packagename] --legacy-peer-deps

ivanoats commented 1 year ago

@YousifAbozid can we close this issue since a new release is out, please?