react-bootstrap-sweetalert
react-bootstrap-sweetalert copied to clipboard
Failed to parse source map errors when running the code
When running application with CRA / react-scripts 5.0 getting a bunch of errors like this:
WARNING in ./node_modules/react-bootstrap-sweetalert/dist/components/Buttons.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\dev\git\solviterp\Ui\node_modules\react-bootstrap-sweetalert\src\components\Buttons.tsx' file: Error: ENOENT: no such file or directory, open 'C:\dev\git\solviterp\Ui\node_modules\react-bootstrap-sweetalert\src\components\Buttons.tsx'
@ ./node_modules/react-bootstrap-sweetalert/dist/components/SweetAlert.js 116:32-52
@ ./node_modules/react-bootstrap-sweetalert/dist/index.js 13:35-69
@ ./src/views/Components/SweetAlert.js 12:0-52 43:35-45 64:35-45 86:35-45 109:35-45 145:35-45 172:35-45 199:35-45 219:35-45 254:37-47 288:35-45 311:35-45
@ ./src/routes.js 24:0-56 171:15-25
@ ./src/layouts/Auth.js 15:0-31 97:32-38 111:31-37
@ ./src/index.js 24:0-41 33:17-27
I can confirm that using "react-scripts": "^4.0.3"
makes this issue go away.
This seems to be due to upgrading to webpack 5. As a workaround you can ignore these warnings by adding env var GENERATE_SOURCEMAP to false See here https://github.com/facebook/create-react-app/discussions/11767
By setting GENERATE_SOURCEMAPS to false, you will make debugging your app much harder. It's being fixed in this PR