webpack-sources: Update to source-map 0.6.1 causes an error when running Webpack
This update seems to create another issue (this is also reported here):
frontend/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:276
throw new Error(
^
Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.
at SourceMapGenerator_validateMapping [as _validateMapping] (frontend/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:276:15)
at SourceMapGenerator_addMapping [as addMapping] (frontend/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:110:12)
at frontend/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:72:17
at Array.forEach (<anonymous>)
at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] (frontend/node_modules/webpack-sources/node_modules/source-map/lib/source-map-consumer.js:157:14)
at Function.SourceMapGenerator_fromSourceMap [as fromSourceMap] (frontend/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:48:24)
at SourceMapSource.node (frontend/node_modules/webpack-sources/lib/SourceMapSource.js:32:35)
at SourceMapSource.proto.sourceAndMap (frontend/node_modules/webpack-sources/lib/SourceAndMapMixin.js:30:18)
at getTaskForFile (frontend/node_modules/webpack/lib/SourceMapDevToolPlugin.js:33:30)
at chunk.files.forEach.file (frontend/node_modules/webpack/lib/SourceMapDevToolPlugin.js:91:21)
Reverting to v1.0.1 resolves this issue.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 28
- Comments: 30 (8 by maintainers)
Commits related to this issue
- Force webpack-sources package version to 1.0.1 because of https://github.com/webpack/webpack-sources/issues/28 — committed to lbryio/lbry-desktop by IGassmann 7 years ago
- https://github.com/webpack/webpack-sources/issues/28 — committed to Intecmedia/Intecmedia.Webpack by dkrnl 6 years ago
- :heavy_plus_sign::heavy_minus_sign::arrow_up:: chore(package): build updates * add `babel-plugin-styled-components`, `enzyme-adapter-react-16` * remove `extract-text-webpack-plugin` * switch from `ba... — committed to thuringia/hotel by deleted user 6 years ago
- Babel Minify clashes with source-map-loader. As we use ES5 compatible Uglify now, we can use the same for both server+client. See: https://github.com/webpack/webpack-sources/issues/28 — committed to sebastian-software/edge by swernerx 6 years ago
- Favor webpack -p flag over babel minify plugin The babel-minify-webpack-plugin was giving me a strange error when building. The Webpack builtin production minifier f does not seem have this issue. h... — committed to SquaredLabs/squaredlabs.uconn.edu by gluxon 6 years ago
- Favor webpack -p flag over babel minify plugin The babel-minify-webpack-plugin was giving me a strange error when building. The Webpack builtin production minifier f does not seem have this issue. h... — committed to SquaredLabs/squaredlabs.uconn.edu by gluxon 6 years ago
- Favor webpack -p flag over babel minify plugin The babel-minify-webpack-plugin was giving me a strange error when building. The Webpack builtin production minifier f does not seem have this issue. h... — committed to SquaredLabs/squaredlabs.uconn.edu by gluxon 6 years ago
- Favor webpack -p flag over babel minify plugin The babel-minify-webpack-plugin was giving me a strange error when building. The Webpack builtin production minifier f does not seem have this issue. h... — committed to SquaredLabs/squaredlabs.uconn.edu by gluxon 6 years ago
- Favor webpack -p flag over babel minify plugin The babel-minify-webpack-plugin was giving me a strange error when building. The Webpack builtin production minifier f does not seem have this issue. h... — committed to SquaredLabs/squaredlabs.uconn.edu by gluxon 6 years ago
- Favor webpack -p flag over babel minify plugin The babel-minify-webpack-plugin was giving me a strange error when building. The Webpack builtin production minifier f does not seem have this issue. h... — committed to SquaredLabs/squaredlabs.uconn.edu by gluxon 6 years ago
- Workaround for webpack/webpack-sources#28 Disable source-map for production as babel-minify-webpack-plugin fails otherwise. — committed to mnemosyne-mon/mnemosyne-server by jgraichen 6 years ago
- Update package.json workaround from https://github.com/webpack/webpack-sources/issues/28 — committed to SwissDataScienceCenter/renku-ui by ebiiii 6 years ago
- Update package.json workaround from https://github.com/webpack/webpack-sources/issues/28 — committed to SwissDataScienceCenter/renku-ui by ebiiii 6 years ago
- Revert to old source-map. Fixes webpack build: https://github.com/webpack/webpack-sources/issues/28 — committed to linkeddata/rdflib.js by RubenVerborgh 6 years ago
- Favor webpack -p flag over babel minify plugin The babel-minify-webpack-plugin was giving me a strange error when building. The Webpack builtin production minifier f does not seem have this issue. h... — committed to SquaredLabs/squaredlabs.uconn.edu by gluxon 6 years ago
- Changing webpack version to 4.x, with reference to https://github.com/webpack/webpack-sources/issues/28 — committed to tusharchitti/nuclear by tusharchitti 5 years ago
- Windows build (#380) * made changes for travis to run buil on windows * made changes for travis to run build on windows * made changes for travis to run build on windows * made changes for t... — committed to nukeop/nuclear by tusharchitti 5 years ago
- Windows build (#380) * made changes for travis to run buil on windows * made changes for travis to run build on windows * made changes for travis to run build on windows * made changes for t... — committed to nukeop/nuclear by tusharchitti 5 years ago
Same issue here. I had to force install version 1.0.1 (rather than letting webpack pull in its own version) to get my project to build:
Replacing
require('babili-weback-plugin')
withrequire('uglifyjs-webpack-plugin')
worksIf you can wait a couple of weeks and assuming you will be able to upgrade immediately;
webpack@4.x
will come with support for UglifyJS2 (expected on or around Feb 24).I have a number of projects using
babel-minify-webpack-plugin
that have been affected by this issue since it first started on 4 November (whenwebpack-sources@1.0.2
was released), and I’ve been patiently waiting for a fix now for three months. Another couple of weeks (for me) isn’t going to hurt. The only reason I was usingbabel-minify
was for it’s support for >ES5, and since UglifyJS2 will now have this, there’s little reason for me to stick with the former.It seems like nobody really wants to take ownership of the problem.
Despite numerous examples showing how to reproduce the problem, some of the early comments in the issue over in
mozilla/source-map
(https://github.com/mozilla/source-map/issues/304) seem to suggest that they think their library is working as intended, and that any ‘fix’ belongs elsewhere.In
webpack/webpack-sources
(here), the problem clearly started when moving tosource-map@0.6.0
; and comments in this thread suggest that they believe the problem squarely lies withsource-map
.@scottohara To be honest, I’m not really interested in UglifyJS2; I chose babel-minify, and I want to stick with it. Switching back to UJS2 won’t solve this issue.
In the meantime, the workaround I implemented was forcing webpack to switch to webpack-sources@1.0.1.
I created a simple example here https://github.com/wvankuipers/webpack-test
It seems to be specific to
Backbone.Marionette
in combination with thebabel-minify-webpack-plugin
package.A (temporary) workaround for this issue is to add
To the configuration of the
babel-minify-webpack-plugin
package.