#Show correct line numbers for NodeJS with typescript

11 messages · Page 1 of 1 (latest)

kindred bloom
#

I am unable to get source mapping working so my typescript errors in nodejs do not have correct line numbers and I do not know where errors are thrown.

Here is an example of an error

    at loop (file:///home/mark/VSCodeProjects/witsand/server/workers/worker.ts:1:2044)```
I've tried installing source-map-support. --enable-source-maps and many other things but I just have no idea why it doesn't work or how to get it working.

The documentation is unclear and I've been walking the web for many hours stumbling across useless posts
vernal marsh
#

hm that stacktrace seems like it was bundled or minified

#

have you tried reducing steps a bit? in case it works without those steps, with just normally compiled ts
im not too experienced with source maps tbh but that's the first thing that comes to mind

kindred bloom
#

Which steps?

violet comet
#

how are you building the ts?

kindred bloom
#

I run the project with tsx watch

#

so I suppose its building during runtime

violet comet
#

odd...

#

tsx watch with default config doesn't seem to be minifying

kindred bloom
#

well perhaps I dont have a default config 🤔

#

I tried a recommended config just now and the issue persists