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 encountered - consumer.computeColumnSpans is not a function - in merge-map.js line 146 #870

Closed
mistergibson opened this issue Oct 4, 2020 · 3 comments

Comments

@mistergibson
Copy link

mistergibson commented Oct 4, 2020

I'm submitting a bug report

Webpack Version:
4.42.1

Babel Core Version:
7.11.2

Babel Loader Version:
8.1.0

Please tell us about your environment:
Linux

Current behavior:
The following error is given when attempting to compile a large javascript file (9.2MB long and CANNOT be broken up) in electron-builder, which relies upon babel to process and load the source code. NOTE: "consumer.computeColumnSpans" is not even in the source code of gxg.js -- not even there.

ERROR in ./resources/gxg.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: /home/mistergibson/Documents/Development/gxg-studio/resources/gxg.js: consumer.computeColumnSpans is not a function
at buildMappingData (/home/mistergibson/Documents/Development/gxg-studio/node_modules/@babel/core/lib/transformation/file/merge-map.js:146:12)
at mergeSourceMap (/home/mistergibson/Documents/Development/gxg-studio/node_modules/@babel/core/lib/transformation/file/merge-map.js:21:17)
at generateCode (/home/mistergibson/Documents/Development/gxg-studio/node_modules/@babel/core/lib/transformation/file/generate.js:74:39)
at run (/home/mistergibson/Documents/Development/gxg-studio/node_modules/@babel/core/lib/transformation/index.js:55:33)
at run.next ()
at Function.transform (/home/mistergibson/Documents/Development/gxg-studio/node_modules/@babel/core/lib/transform.js:27:41)
at transform.next ()
at step (/home/mistergibson/Documents/Development/gxg-studio/node_modules/gensync/index.js:254:32)
at gen.next (/home/mistergibson/Documents/Development/gxg-studio/node_modules/gensync/index.js:266:13)
at async.call.value (/home/mistergibson/Documents/Development/gxg-studio/node_modules/gensync/index.js:216:11)
@ ./src/main/index.js 48:12-45
@ multi ./src/main/index.js

Expected/desired behavior:
process the large javascript file and conclude.

  • What is the expected behavior?
    process the large javascript file and conclude.

  • What is the motivation / use case for changing the behavior?
    I need to compile my code? odd question.

@luoguoxiong
Copy link

I had a similar problem ~~~~~

@nicolo-ribaudo
Copy link
Member

merge-map.js has been simplified, we don't use computeColumnSpans anymore: https://github.com/babel/babel/blob/main/packages/babel-core/src/transformation/file/merge-map.ts

@vasicvuk
Copy link

vasicvuk commented Aug 6, 2022

Hi @nicolo-ribaudo, Can you explain how should we use this version without calling computeColumnSpans. Latest version of npmjs is 7.18.10 and it still has this issue?

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

4 participants