stripe-archive / react-stripe-elements

Moved to stripe/react-stripe-js.
https://github.com/stripe/react-stripe-js
MIT License
3.03k stars 319 forks source link

Error, you may need an appropriate loader to handle this file type while importing from @stripe/react-stripe-js #508

Closed aakash1419 closed 4 years ago

aakash1419 commented 4 years ago

hii.. i am getting this error while bulding react. ./nodemodules/@stripe/react-stripe-js/dist/react-stripe.umd.js Module parse failed: Unexpected token (1555:32) You may need an appropriate loader to handle this file type. | return {}; | } | const { paymentRequest: , ...rest } = options; | return rest; | };

this usually occurs when i try to import {Elements} from '@stripe/react-stripe-js'

i had googled it many times but unable to find an appropriate solution. i had also taken reference from this : https://github.com/stripe/react-stripe-elements/issues/377

could anyone please help

dweedon-stripe commented 4 years ago

Thanks for the report. This looks related to https://github.com/stripe/react-stripe-js/issues/50. There is currently a bug where we are not correctly transpiling down ES5. Should have a fix out later today.

I am going to close this issue since it is about React Stripe.js not react-stripe-elements, feel free to post any additional information on the existing issue thread.