question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to parse source map

See original GitHub issue

Using zod: 3.11.6

We are having warning in index.mjs

WARNING in ./node_modules/zod/lib/index.mjs
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\repos\Git\WorkZone\WZ-Teams\Source\tabs\node_modules\zod\src\types.ts' file: Error: ENOENT: no such file or directory, open 'C:\repos\Git\WorkZone\WZ-Teams\Source\tabs\node_modules\zod\src\types.ts'

apparently the referenced src\types.ts is not shipped with package, leading to such error.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:11
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
alspdxcommented, Jan 19, 2022

react-scripts 5.0.0 introduced Webpack 5, so it’s probably reason.

react-scripts 5.0.0 also adds source-map-loader to the Webpack configuration, which is where this error is originating. It is possible to configure Webpack to ignore warnings but that might not be the best default configuration for CRA. Looks like #864 will take care of it.

1reaction
PawelJ-PLcommented, Jan 4, 2022

react-scripts 5.0.0 introduced Webpack 5, so it’s probably reason. As temporary workaround I disabled generating source map in my project (GENERATE_SOURCEMAP=false) so I didn’t need do downgrade react-scripts

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESRI : Failed to parse source map - Stack Overflow
I am getting this error in the Google chrome developer console. Failed to parse SourceMap: http://localhost ...
Read more >
After Upgrading to CRA 5.0 getting a lot of: Failed to parse ...
The best solution is to open a issue or pullrequest on that packages. The warnings are correct. These packages source maps pointing to...
Read more >
Failed to parse source map warnings - Dynamic Docs
If using create-react-app v5, you may see some warnings (although they appear like errors) when running/building your react application.
Read more >
"Failed to parse source map" errors with datetime picker and ...
Hello, When using the Atlaskit DateTimePicker components in my Create React App 5.0.0 app, I get warnings about missing sourcemaps in ...
Read more >
upgrading to webpack 5 causes sourcemap issues : r/typescript
node_modules/source-map-loader/dist/cjs.js): Failed to parse source map ... in the package tsconfig , I have enabled sourcemap generation, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found