GregTk
GregTk

Reputation: 240

Node.JS + TypeScript how I can track the source code from the stack trace?

As I understand typescript will be transpiled to JavaScript and if something inside of my code will throw an error it will contain the stack trace with line numbers of JavaScript not TypeScript. Is any libraries, plugins exists to solve this problem for production running instance? I know that for web we have map.js files is something the similar exist for node.js?

Upvotes: 2

Views: 1689

Answers (1)

Jeremy Thille
Jeremy Thille

Reputation: 26380

Run your app using ts-node, not node directly.

Upvotes: 2

Related Questions