source-map-explorer icon indicating copy to clipboard operation
source-map-explorer copied to clipboard

Error: consumer.computeColumnSpans is not a function

Open souenzzo opened this issue 5 years ago • 4 comments

Description I get non-descriptive error when I try to generate.

Steps to reproduce

  1. git clone https://github.com/souenzzo/eql-realworld-example-app && cd eql-realworld-example-app
  2. git checkout 7c167137e0a080d8ea27b5ec84ede8bc038326a4
  3. npx [email protected] conduit/*.js
  4. You will get:
conduit/main.js
  consumer.computeColumnSpans is not a function

Files to reproduce Included on steps

Expected behavior I expected an output

Environment

Additional context

This bundle is a clojurescript bundle generated via shadow-cljs, that do some tricks to make node_modules work with closure-compiler in advanced mode.

souenzzo avatar Aug 16 '20 16:08 souenzzo

I ran into this too - this seems to be a bug in the latest released version of the source-map package. If you install source-map from the git repo (and remove the copy under source-map-explorer's node_modules), it seems to get further.

mikekap avatar Aug 20 '20 02:08 mikekap

The "lastest released" version of source-map was 2 years ago https://www.npmjs.com/package/source-map I see that my package-lock.json was using 0.7.3

Bumping to 0.8.0-beta.0 I get

conduit/main.js
  Your source map refers to generated column Infinity on line 3, but the source only contains 512 column(s) on that line.
  Check that you are using the correct source map.

Downgrade to 0.7.2 I get

gh-pages/conduit/main.js
  consumer.computeColumnSpans is not a function

Down to 0.6.1

gh-pages/conduit/main.js
  consumer.computeColumnSpans is not a function

I will try to "just parse" my source-maps using source-map directly to see if get better error messages, but it's working on FF/ChromX

souenzzo avatar Aug 20 '20 04:08 souenzzo

Yea unfortunately shadow-cljs generates partially invalid source maps. Try passing --no-border-checks to source-map-explorer which will just skip the check.

mikekap avatar Aug 20 '20 21:08 mikekap

How can I know more info about who invalid these source-maps are? I can try to fix it at shadow-cljs side.

souenzzo avatar Aug 20 '20 22:08 souenzzo