Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: consumer.computeColumnSpans is not a function #190

Open
souenzzo opened this issue Aug 16, 2020 · 4 comments
Open

Error: consumer.computeColumnSpans is not a function #190

souenzzo opened this issue Aug 16, 2020 · 4 comments

Comments

@souenzzo
Copy link

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 source-map-explorer@2.4.2 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

  • OS: Linux/ node@v14.8.0
  • 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.

@mikekap
Copy link

mikekap commented Aug 20, 2020

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.

@souenzzo
Copy link
Author

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

@mikekap
Copy link

mikekap commented Aug 20, 2020

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

@souenzzo
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants