gatsby: New installs of Gatsby fail on builds with source-map 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.
It seems to just have started happening ~8-12 hours ago.
Neither webpack, webpack-sources, nor source-map have had new releases.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 9
- Comments: 18 (10 by maintainers)
Seems a bug in terser 4.0.1
Somehow I can only get v2.10.0 working with the resolution pinning terser to v4.0.0.
And v2.13.1 works neither with the resolution nor without.
So I will have to wait for a working version.
Temporary fix published in
gatsby@2.11.6, thanks @pieh!@joeynimu This sandbox uses terser 4.0.0. You can check it using
yarn why terser. If you runyarn upgradethere, then you’ll get terser 4.0.1 andyarn buildwill start failing.@iRoachie I tried it with a new project and it fixed this issue for me. It’s possible that you have other library that has
terseras a dependency. You can runyarn why terserto confirm how many versions of terser you have and which one is actually used.You can try this to force terser 4.0.0 for all libraries (if I understand correctly how resolutions work in yarn):
Here’s a workaround, if you use
yarn. You can force a working version of terser by adding the following lines to yourpackage.json:Happened to me while presenting 😂