Expected Behavior
I use ts-node to run an express app. An error handler catches exceptions. I expect line numbers to match the actual ones.
Actual Behavior
The line numbers don't match.
Steps to reproduce the problem
- Run our (non-open-source) express app using ts-node
- Trigger some exception
- See stack trace with wrong line numbers
Minimal reproduction
When I run TypeStrong/ts-node-repros#4 locally on my Windows machine, I get different results compared to the Github Action result.
Github Action (correct):

Local machine (wrong):

On my machine, it reports line 4 to throw, as opposed to line 6 in the Github Action.
When I set hookRequire = true in the sourceMap setup, it starts reporting correct line numbers on my machine, too.


Specifications
ts-node v8.10.1
node v12.17.0
compiler v3.9.3
Expected Behavior
I use ts-node to run an express app. An error handler catches exceptions. I expect line numbers to match the actual ones.
Actual Behavior
The line numbers don't match.
Steps to reproduce the problem
Minimal reproduction
When I run TypeStrong/ts-node-repros#4 locally on my Windows machine, I get different results compared to the Github Action result.
Github Action (correct):

Local machine (wrong):

On my machine, it reports line 4 to throw, as opposed to line 6 in the Github Action.
When I set
hookRequire = truein the sourceMap setup, it starts reporting correct line numbers on my machine, too.Specifications
ts-node v8.10.1
node v12.17.0
compiler v3.9.3
Operating system and version: Windows 10
If Windows, are you using WSL or WSL2?: No