Is there source map support for typescript in node / nodemon?

🚩 for Node versions since v12.12, there is an easier and better solution.

I recently got this working in my express app. Steps as follows:

Install the required library:

npm install --save-dev source-map-support

In your entry point (eg app.ts):

require('source-map-support').install();

In your app.ts, you may also require better logging for errors within promises:

process.on('unhandledRejection', console.log);

In your tsconfig, under compilerOptions:

"inlineSourceMap": true

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)