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

Deno don't recognise Inline Source Map #20392

Closed
al6x opened this issue Sep 6, 2023 · 2 comments
Closed

Deno don't recognise Inline Source Map #20392

al6x opened this issue Sep 6, 2023 · 2 comments

Comments

@al6x
Copy link

al6x commented Sep 6, 2023

Deno doesn't recognise inline source map and prints error stack trace in JS build, not in CoffeeScript source.

CoffeeScript Source:

hi = ->
  throw new Error 'nope'
  console.log 'hi'
hi()

JS build with inline source map as result of coffee --compile --no-header --bare --inline-map play.cs

var hi;

hi = function() {
  throw new Error('nope');
  return console.log('hi');
};

hi();

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxheS5qcyIsInNvdXJjZVJvb3QiOiIvIiwic291cmNlcyI6WyJwbGF5LmNzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLElBQUE7O0FBQUEsRUFBQSxHQUFLLFFBQUEsQ0FBQSxDQUFBO0VBQ0gsTUFBTSxJQUFJLEtBQUosQ0FBVSxNQUFWO1NBQ04sT0FBTyxDQUFDLEdBQVIsQ0FBWSxJQUFaO0FBRkc7O0FBR0wsRUFBQSxDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiaGkgPSAtPlxuICB0aHJvdyBuZXcgRXJyb3IgJ25vcGUnXG4gIGNvbnNvbGUubG9nICdoaSdcbmhpKCkiXX0=
//# sourceURL=/alex/projects/js/play.cs

Running with deno, note the stack trace is wrong, it shows JS files, not CoffeeScript

> deno run play.js
error: Uncaught Error: nope
  throw new Error('nope');
        ^
    at hi (file:///alex/projects/js/play.js:4:9)
    at file:///alex/projects/js/play.js:8:1
@lino-levan
Copy link
Contributor

lino-levan commented Sep 6, 2023

Seems to be a duplicate of #4499

I misread the issue. Inline source maps should just work.

@lucacasonato
Copy link
Member

This is a duplicate of #4499

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

3 participants