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

Not compatible with source-map v0.6.1 #870

Closed
3cp opened this issue Apr 20, 2018 · 2 comments
Closed

Not compatible with source-map v0.6.1 #870

3cp opened this issue Apr 20, 2018 · 2 comments

Comments

@3cp
Copy link
Member

3cp commented Apr 20, 2018

I'm submitting a bug report

  • Library Version:
    0.33.1

  • Operating System:
    All

  • Node Version:
    8.10.0

  • NPM Version:
    5.8.0
    yarn is not affected

  • Browser:
    NA

  • Language:
    NA

  • Loader/bundler:
    NA

Current behavior:

Depends on user app's extra dependencies (like postcss), sometimes npm resolved source-map package to v0.6.1 instead of v0.5.7.

Yarn somehow always gives me v0.5.7.

When v0.6.1 is in used, following error is thrown

Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.
at SourceMapGenerator_validateMapping [as _validateMapping] (/Users/huocp/bw/bcx-ui/node_modules/source-map/lib/source-map-generator.js:276:15)
  • What is the expected behavior?
    You can duplicate the error by forcing "source-map": "^0.6.1" in local app's package.json.

  • What is the motivation / use case for changing the behavior?

This can be temporarily fixed by adding "source-map": "^0.5.7" to aurelia-cli's package.json dependencies.
But long term fix should be updating cli's code to be compatible with latest source-map version.

@3cp
Copy link
Member Author

3cp commented May 1, 2018

@Alexander-Taran @JeroenVinke I have strong feeling that everyone are using yarn.
Because I can consistently reproduce this issue on new cli+requirejs app with npm v6.

Update: I can consistently reproduce this issue on new cli+requirejs app with uglify-es #864 with npm v5/v6, but not standard cli.

I don't understand how uglify-es affected npm's decision, both uglify-es and uglify-js have exactly same depended "source-map": "~0.6.1" in their package.json's "dependencies".

Let me know your thoughts on the proposed temporary solution. I have not spent anytime on long term solution.

@3cp
Copy link
Member Author

3cp commented May 18, 2018

The PR is a proper long-term fix. Please ignore my proposed short-term fix.

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

1 participant