Closed pmezard closed 1 year ago
Did you get this resolved? I've also run into the problem of incorrect line numbers in the stack traces.
esbuild-register
version >3.4.2 and node 18.17
and node 16
.
I also tried setting sourceMap
to True
in the tsconfig.json
I finally took the time to bisect the codebase to build a reproducer. I had 2 related issues:
-r source-map-support/register
. It is now obvious this should be done but not being a node expert, it took me a bit of time to understand this stuff is unrelated to native source maps now favored by esbuild-register. And having both at the same time does not work.source-map-support/register
directly. Very nice to debug that one.Once those removed, line numbers are good again. For the record, I am using:
dev esbuild 0.17.18
dev esbuild-register 3.4.2
And will try to upgrade esbuild soon. Another adventure I guess.
Closing the issue.
Hello,
This is probably a misconfiguration on my side but I have spent some time testing various option combinations to no avail. I have a command like:
When throwing an error with 3.3.1, the stack trace is correct. When throwing an error with 3.3.2 (or 3.4.2), the trace line numbers are incorrect. This is running with node 18.15.0
I have tried removing
source-map-support/register
or adding --enable-source-maps, without success.Before trying to make a minimal test case, would you have anything coming to mind about this?
Thanks,