less.js: Source map bug introduced in 2.7.0, but passes tests

Will put out a hotfix soon if the fix can be confirmed. It looks like PR #2834 introduced a bug that produces a blank source map, and throws an error like:

Invalid mapping: {"generated":{"line":1103,"column":2},"source":"file.less","original":{"line":1,"column":null},"name":null}

(Also discussed at #2881.)

Reverting #2834 seems to fix it, but looking for confirmation.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 15
  • Comments: 19 (5 by maintainers)

Commits related to this issue

Most upvoted comments

This just broke my builds, need a patch asap…

Awesome. Sorry for the broken build everyone, but glad it’s working now. Will close this.

better unpublish this version

I’ve published 2.7.1 as a hotfix for 2.7.0, but it’s unclear from #2881 if there isn’t still an outstanding bug affecting source maps (multiple intersecting bugs from same commit?), or if that was a pre-existing bug which was introduced separately.

Please report back if 2.7.1 is working for you.

Clearly the impact is widespread. It blocked my production release. Yes, please implement a hotfix, and provide workarounds, but in the meantime, for the love of all that is good and holy:

$ npm unpublish less@2.7.0

Unless you will have 2.7.1 published within, say, the next hour, nip this in the bud and unpublish.

If you’re having trouble with a dependency using less as a dependency and simply can’t downgrade in package.json. Do a npm shrinkwrap --dev and then modify the version of less to 2.6.1 then full npm reinstall will fix it until less.js is fixed

This issue should stay open until a Less.js test is added which catches this issue, since the source map tests didn’t detect the bug.