stripe-samples / accept-a-payment

Learn how to accept a payment from customers around the world with a variety of payment methods.
MIT License
652 stars 498 forks source link

Upgrading react version to 18 in examples generated via cli as Stripe already supports its #1979

Open maxkokocom opened 1 year ago

maxkokocom commented 1 year ago

Bug report

Describe the bug

Generated examples via stripe samples create accept-a-payment use react 17 while stripe already claims support for react 18: https://github.com/stripe/react-stripe-js/issues/273

To Reproduce

stripe samples create accept-a-payment

hideokamoto-stripe commented 9 months ago

Thank you for the report. The react sample was created using Create React App. The error reported seems to be due to a library used internally by Create React App: https://github.com/facebook/create-react-app/issues/11708#issuecomment-986309926

As there seems to be no releases from Create React App from the year 2022, it may be necessary to consider migrating to something like Vite. As a temporary workaround, please use NODE_OPTIONS='--openssl-legacy-provider' option like the following: NODE_OPTIONS='--openssl-legacy-provider' react-scripts start

Best.