Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 17 Support #140

Closed
benrhere opened this issue Nov 27, 2020 · 5 comments
Closed

React 17 Support #140

benrhere opened this issue Nov 27, 2020 · 5 comments

Comments

@benrhere
Copy link

Summary

Other information

React 17 is functionally very similar to 16, but I get these warns upon npm install after upgrading to it.

npm WARN @stripe/[email protected] requires a peer of react@^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN @stripe/[email protected] requires a peer of react-dom@^16.8.0 but none is installed. You must install peer dependencies yourself.

@navaneeth-dev
Copy link

npm i @stripe/react-stripe-js @stripe/stripe-js

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.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0" from @stripe/[email protected]
npm ERR! node_modules/@stripe/react-stripe-js
npm ERR!   @stripe/react-stripe-js@"*" 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 /home/rize/.npm/eresolve-report.txt for a full report.

Not able to install with yarn or npm

@Sydwelll
Copy link

UP ! Same here

@navaneeth-dev
Copy link

UP ! Same here

This package is dead I suggest using @stripe/stripe-js and manually use the API.

@christopher-stripe
Copy link
Contributor

We're planning to publish to a new version of React Stripe.js with React 17 as a supported peer dependency, which will resolve this error.

React 17 made changes to the timing of useEffect cleanup functions, which React Stripe.js makes use of. So before we publish a new version, we are testing React Stripe.js with a variety of React 16 and React 17 integrations to ensure we won't cause any regressions.

@dweedon-stripe
Copy link
Contributor

This was fixed in #147 and released in v1.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants