weareseeed / react-square-web-payments-sdk

Easily create PCI-compliant inputs to accept payments online with the Square Payments API. It supports the following payment methods: credit and debit cards, ACH bank transfers, Apple Pay, Google Pay, Gift Cards and Afterpay/Clearpay.
https://react-square-payments.weareseeed.com/
MIT License
33 stars 35 forks source link

Not working giving error like ./node_modules/react-square-web-payments-sdk/dist/components/divider/divider.es.js 13:15 Module parse failed: Unexpected token (13:15) File was processed with these loaders: * ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js #86

Open aliumair7 opened 1 year ago

aliumair7 commented 1 year ago

Describe the bug

Giving error while run my app ./node_modules/react-square-web-payments-sdk/dist/components/divider/divider.es.js 13:15 Module parse failed: Unexpected token (13:15) File was processed with these loaders:

packagejsonm.txt

Your Example Website or App

React

Steps to Reproduce the Bug or Issue

yarn start

Expected behavior

Not Working

Screenshots or Videos

No response

Platform

Windows

Additional context

No response

Muhammad406 commented 1 year ago

Facing the same issue, it would nice if the developers @eidast @laviddichterman @alexbrazier @ezesundayeze could give a workaround for this.

Muhammad406 commented 1 year ago

@aliumair7 solved this by updating my react version to 18+. version "17.." react have old version of babel-loader which raises conflicts with this.

jasondwyer commented 1 year ago

Having the same issue. I updated react to v18.2.0 and still didn't fix. @Muhammad406 was that the only change you made?

Keith3679 commented 1 year ago

Same error here. Anyone solve this yet?

Muhammad406 commented 1 year ago

@jasondwyer try to locate the package that used babel-loader. Try updating that. I looked into my node modules to see what other packages were using babel-loader and updated those (in my case which was react). try using npm list <package-name>

jasondwyer commented 1 year ago

@Muhammad406 - that solved it for me. I ran npm list babel-loader which revealed that react-scripts was the package at fault. I checked my package.json and had version 3.4.1 of react-scripts, which I upgraded to 5.0.1 and that solved the issue. CC @Keith3679 - Cheers