react-image icon indicating copy to clipboard operation
react-image copied to clipboard

Failed to parse source map index.js.map after upgrading to CRA 5/Webpack 5

Open RabeeAbuBaker opened this issue 3 years ago • 7 comments

The project was recently upgraded from using Craco to CRA5, the same warning showed up for dozens of libraries but upgrading them to the latest versions fixed the issue. We're left with the only warning coming from react-image.

See the error below:

Screen Shot 2022-03-14 at 2 07 30 PM

Node version: v16.14.0 NPM version: 8.5.3 react-scripts: ^5.0.0 react-image: ^4.0.3

RabeeAbuBaker avatar Mar 14 '22 12:03 RabeeAbuBaker

It doesn't seem like there is a sourcemap included for any of the builds. Need to see how to remove that sourcemap comment

mbrevda avatar Mar 14 '22 12:03 mbrevda

also seeing this

realstrategos avatar Jun 20 '22 14:06 realstrategos

Would it be preferable to include the sourcemap or to implement #890?

mbrevda avatar Jul 03 '22 09:07 mbrevda

remove it?

realstrategos avatar Jul 03 '22 15:07 realstrategos

cc @deskoh

mbrevda avatar Jul 03 '22 16:07 mbrevda

cc @deskoh

Since it's not a complicated library suggest to remove it? Any consideration or strong use case to include source map for 3rd party libs?

deskoh avatar Jul 03 '22 23:07 deskoh

My argument would make that it provides more context to errors allowing users to either determine how they missuses the component leading to the error or helping the user pinpoint the point of error leading to better bug reports.

Guess I'll take cues from some other libs and see what makes sense. Thanks all!

mbrevda avatar Jul 04 '22 05:07 mbrevda

I'm running into this as well and really need it to be fixed. Otherwise the only way to get my project to run is to turn off all sourcemaps, which is not ideal.

ericklind avatar Oct 24 '22 20:10 ericklind

fixed in https://github.com/mbrevda/react-image/commit/b605b71066f70d4f64cdcbf4a8796cfd2ebe5d22 by disabling sourcemaps

mbrevda avatar Oct 05 '23 12:10 mbrevda