Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to parse source map errors when running the code #78

Open
anking opened this issue Dec 19, 2021 · 3 comments
Open

Failed to parse source map errors when running the code #78

anking opened this issue Dec 19, 2021 · 3 comments

Comments

@anking
Copy link

anking commented Dec 19, 2021

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
@rickwargo
Copy link

I can confirm that using "react-scripts": "^4.0.3" makes this issue go away.

@flefloch-payps
Copy link

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 facebook/create-react-app#11767

@isabellachen
Copy link

isabellachen commented Sep 21, 2022

By setting GENERATE_SOURCEMAPS to false, you will make debugging your app much harder.
It's being fixed in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants