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)

Most upvoted comments

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 run yarn upgrade there, then you’ll get terser 4.0.1 and yarn build will 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 terser as a dependency. You can run yarn why terser to 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):

"resolutions": {
  "terser": "4.0.0"
}

Here’s a workaround, if you use yarn. You can force a working version of terser by adding the following lines to your package.json:


"resolutions": {
  "terser-webpack-plugin/terser": "4.0.0"
}

Happened to me while presenting 😂