source-map-explorer
source-map-explorer copied to clipboard
Error: consumer.computeColumnSpans is not a function
Description I get non-descriptive error when I try to generate.
Steps to reproduce
git clone https://github.com/souenzzo/eql-realworld-example-app && cd eql-realworld-example-appgit checkout 7c167137e0a080d8ea27b5ec84ede8bc038326a4npx [email protected] conduit/*.js- 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
- OS: Linux/
[email protected] - source-map-explorer Version 2.4.2
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.
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.
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
Yea unfortunately shadow-cljs generates partially invalid source maps. Try passing --no-border-checks to source-map-explorer which will just skip the check.
How can I know more info about who invalid these source-maps are? I can try to fix it at shadow-cljs side.