Large number of Source Map Loader warnings when React starts
See original GitHub issueWhen I start my React app, I get 28 warnings in the console from react-zoom-pan-pinch, all about the source-map-loader:
WARNING in ./node_modules/react-zoom-pan-pinch/dist/index.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '###\node_modules\react-zoom-pan-pinch\src\components\transform-component.tsx' file: Error: ENOENT: no such
file or directory, open '###\node_modules\react-zoom-pan-pinch\src\components\transform-component.tsx'
I’m using the latest version 2.1.3. I’ve tried searching for a solution but cannot find anything straightforward. As far as I understand, it may be something in the react-zoom-pan-pinch distribution is trying to reference the source files, which aren’t available on the npm install.
Would appreciate if anybody knows how to resolve this as I want to generate source maps in development (and whilst I don’t mind if I have them or not for this module) it would be nice to clean up the large number of console warnings.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:6
Top Results From Across the Web
What is this error coming from source-map-loader and how do ...
I've been trying to debug this for an hour now, but have made little to no progress. This error is coming from a...
Read more >Troubleshooting Source Maps for React - Sentry Documentation
Once completed, use the sourcemaps explain command, by calling it with the event ID that can be found at the top of the...
Read more >source-map-loader - webpack
source -map-loader allows webpack to maintain source map data continuity across libraries so ease of debugging is preserved. The source-map-loader will extract ...
Read more >Optimizing Performance - React
By default, React includes many helpful warnings. These warnings are very useful in development. However, they make React larger and slower so you...
Read more >JavaScript Debugging with Sourcemaps - TrackJS
If you're using Angular 2, React, Om, Elm, or others, there are huge advantages to debugging by using sourcemaps. We'll show you what...
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
Ah, yes, that is fair. I don’t use create-react-app myself but from reading through their docs I believe your understanding is correct that you would need to do manual config management after ejecting. (If it really bothers you, you could always copy the “src” folder into the package on disk in your node_modules folder 😛)
I don’t maintain this package, but I opened #266 for the simple solution of including “src” in the list of published files.
I have released a fork as @pronestor/react-zoom-pan-pinch that fixes this issue.