-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Missing source marker on error throw by vm module with --enable-source-maps
#39149
Comments
@bcoe FYI |
Prior to #33491 no attempt was made to include a source marker in error output ... so I don't think it introduced the bug, so much as this must be an edge case it doesn't support. We'll need to dig into this, thanks for the report. |
@aduh95 @bcoe In case it helps we are having the same problem on v16.14.0 and v14.19.0 however v14.16.0 works correctly. I am able to replicate with just one character. test.js
What is the expected behavior?
What do you see instead?
|
We have logic that reads the original source of disk when an error occurs, and uses it to place the source marker, here: Will need to dig into if there's way for us to figure out this info in the |
We are seeing this same issue using vm here ember-fastboot/ember-cli-fastboot#894, thanks for the PR @cola119 ! |
Is still help needed? |
Fixed in v18.7.0 |
14.17.0
,16.1.0
,16.4.0
and very likely all betweenWhat steps will reproduce the bug?
Executing the snippet will display the source code line with the marker
^
where the error happened:But when executing node with
--enable-source-maps
the source code line with the marker is not displayed:How often does it reproduce? Is there a required condition?
It does always reproduce. I have tested on node
14.17.0
,16.1.0
and16.4.0
.What is the expected behavior?
Always display the source location with the marker
^
no matter whether--enable-source-maps
is set or not.What do you see instead?
Additional information
On node 14.16.1 the source code line with the marker is always displayed no matter whether
--enable-source-maps
is set or not. I have looked into the Changelog and I think that maybe #33491 has introduced this bug.The text was updated successfully, but these errors were encountered: