-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
Wrong line number from Error.stack #1495
Comments
This is probably an issue with For a list of reasons why we're using |
Sounds similar and related, indeed... Do you think there is a way for me to workaround this until 10.3.0 is released? For instance with something like |
I just published 10.3.0 so this should be solved. If you hit problems, though, please let us know. We can always re-open this issue or you can file a new one. https://github.com/TypeStrong/ts-node/releases/tag/v10.3.0 |
I confirm it's working fine now with v10.3.0. Thanks a lot! |
I'm not sure but I think this is happening again with 10.9.1. (And likely earlier versions - I've not checked.) I've just raised a bug against pino-caller but on further searching it might be a recurrence of this bug instead. Cheers |
I'd only noticed it in Node 20, but I've not tried in earlier versions so I'm not 100%. |
Search Terms
stack, line number
Expected Behavior
Error stack should provide the exact line number where the error occurs
Actual Behavior
In some cases, the error stack provides a wrong line number
Steps to reproduce the problem
I have created a repo to reproduce the problem with the smallest setup I could: https://github.com/bchabrier/tsnodewronglinenumber
The test compiles the
.ts
file once withts-node
and once withtsc
to show that withts-node
the error stack provides a wrong line number while using the.js
file compiled bytsc
the line number is correct.Also, the test shows that it fails or succeeds depending on what module is imported behind...
Minimal reproduction
Clone https://github.com/bchabrier/tsnodewronglinenumber
Run
sh ./run.sh
On my system is shows:
Specifications
ts-node v10.2.1
node v14.16.0
compiler v4.4.3
Linux raspberrypi 4.19.118-v7+ #1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l GNU/Linux
The text was updated successfully, but these errors were encountered: