GA-MO / react-confirm-alert

react component confirm dialog.
https://ga-mo.github.io/react-confirm-alert/demo/
MIT License
273 stars 105 forks source link

Module parse failed: Unexpected token #53

Closed chandra10207 closed 3 years ago

chandra10207 commented 4 years ago
ERROR in ./node_modules/react-confirm-alert/src/react-confirm-alert.css 1:38
Module parse failed: Unexpected token (1:38)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> body.react-confirm-alert-body-element {
|   overflow: hidden;
| }
 @ ./src/components/PatientList.js 29:0-57
 @ ./src/components/App.js
 @ ./src/index.js
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! frontend@1.0.0 dev: `webpack --mode development ./src/index.js --output ./static/frontend/js/main.js`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the frontend@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sonichandra/.npm/_logs/2020-08-27T22_01_15_614Z-debug.log
joconaut commented 3 years ago

Seems like webpack tries to load react-confirm-alert.css and fails because it has no loader defined for css files. This one might help: https://blog.jakoblind.no/css-modules-webpack/