webpack 5: Failed to parse source map from "@mswjs/interceptors"
See original GitHub issueDescribe the bug
New webpack 5.0 throwing compilation error regarding source map not found
there are multiple of these, but for the sake of simplicity, i just pasted one of it.
Environment
msw: 0.36.3
nodejs: 14.18.2
npm: 8.3.0
Please also provide your browser version. N/A, this is compilation warning error
To Reproduce
Steps to reproduce the behavior:
- Create new react app using CRA5.0
- install latest msw.
- Npm start, the warnings are being thrown in the terminal
Expected behavior
should not have these warning errors.
Screenshots
Issue Analytics
- State:
- Created 2 years ago
- Reactions:23
- Comments:17 (6 by maintainers)
Top Results From Across the Web
Webpack Module Warning: Failed to parse source map from ...
As a sort of fix I removed the source-map-parser and the warning disappeared. Is it possible this issue happened because a webpack watch...
Read more >Fixing sourcemap errors in Webpack 5 - Ionic React
[react-scripts] Failed to parse source map from '/home/anon/d/ionic/node_modules/@capacitor/app/src/definitions.ts' file: Error: ENOENT: no ...
Read more >source-map-loader - webpack
The source-map-loader extracts existing source maps from all JavaScript entries. This includes both inline source maps as well as those linked via URL....
Read more >upgrading to webpack 5 causes sourcemap issues : r/typescript
Hi all, I am not sure if this is a webpack or typescript issue so if I am ... node_modules/source-map-loader/dist/cjs.js): Failed to parse...
Read more >Failed to parse source map warnings - Dynamic Docs
node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'node_modules/json-rpc-engine/src/mergeMiddleware.ts' file: Error: ENOENT: no ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For Windows Users 🚀🤘
Create an environment variables file named
.env
in the project root and addGENERATE_SOURCEMAP=false
to it.OR
Run
npm i -D cross-env
and then in thepackage.json
file update the start script to the following:In case someone is lost on how to do it, just add the
GENERATE_SOURCEMAP=false
before the start script. In my case: