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.

CRA5 source map warning

See original GitHub issue

Hi team. I’m getting this error with create-react-app 5.0 for all hooks.

WARNING in ./node_modules/usehooks-ts/esm/useWindowSize/useWindowSize.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '$REPO_ROOT/node_modules/usehooks-ts/src/useWindowSize/useWindowSize.ts' file: Error: ENOENT: no such file or directory, open '$REPO_ROOT/node_modules/usehooks-ts/src/useWindowSize/useWindowSize.ts'

And it has been complained a lot here: https://github.com/facebook/create-react-app/discussions/11767

Should we add some source map support?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
juliencrncommented, Jan 25, 2022

This is fixed, available on usehooks-ts@2.2.2 🎉 Thanks, @PabloLION for the bug report! 👍

1reaction
juliencrncommented, Sep 22, 2022

Source-map have been removed in usehooks-ts@2.7.1 (https://github.com/juliencrn/usehooks-ts/releases/tag/usehooks-ts%402.7.1). Thanks for reminding 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

After Upgrading to CRA 5.0 getting a lot of: Failed to parse ...
The warnings are correct. These packages source maps pointing to src that is not included in the package. The solution would be to...
Read more >
Typescript CRA with MSW: failed to parse source map
Webpack 5 used in that version of react-scripts is clashing with msw somehow. You have a couple of options for now: disable source...
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 >
Fixing sourcemap errors in Webpack 5 - Ionic React
However, when I run npm run serve , I noticed I am getting several sourcemap errors: [react-scripts] Failed to parse source map from ......
Read more >
upgrading to webpack 5 causes sourcemap issues : r/typescript
Ever since upgrading to CRA5 (which is using webpack 5), I am getting sourcemap warnings. While they are just warnings, everything still ...
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