You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically if an uncaught error is displayed, as per normal node procedure the line of the code where the error was thrown is shown, in the original sourcemap. However tsx dumps the whole contents of the file, minified, into the console. For small files, as in the reproduction, I guess this is fine? But for big files the console gets utterly spammed with completely useless minified code. Curiously, the file paths are correct.
I couldn't get to reproduce this on Stackblitz… so I'm guessing this is some sort of Windows problem? But it doesn't happen with ts-node.
I tested with npm and yarn and both had the same result. And whatever is in tsconfig.json seems to make no difference.
The expected behaviour for me would be for the code displayed in the error trace to only show the line of the affected code, source-mapped to the original Typescript.
Contributions
I plan to open a pull request for this issue
I plan to make a financial contribution to this project
The text was updated successfully, but these errors were encountered:
I believe you were experiencing #478 which was fixed in v4.7.2
I'm guessing most people stumbling across this thread may be confusing this with that too.
Acknowledgements
Minimal reproduction URL
https://gist.github.com/unleashy/6b0956eb7572cafbf0eb5f18c9c491a4
Version
v4.7.0
Node.js version
v20.10.0
Package manager
N/A
Operating system
Windows
Problem & Expected behavior
Run
npx tsx foo.ts
with the code from the gist:Basically if an uncaught error is displayed, as per normal node procedure the line of the code where the error was thrown is shown, in the original sourcemap. However tsx dumps the whole contents of the file, minified, into the console. For small files, as in the reproduction, I guess this is fine? But for big files the console gets utterly spammed with completely useless minified code. Curiously, the file paths are correct.
I couldn't get to reproduce this on Stackblitz… so I'm guessing this is some sort of Windows problem? But it doesn't happen with ts-node.
I tested with npm and yarn and both had the same result. And whatever is in tsconfig.json seems to make no difference.
The expected behaviour for me would be for the code displayed in the error trace to only show the line of the affected code, source-mapped to the original Typescript.
Contributions
The text was updated successfully, but these errors were encountered: