Bug/feature: ts-node should work with NODE_OPTIONS
See original GitHub issueThis works:
ts-node --inspect-brk foo.ts # ❤️
but this doesn’t
NODE_OPTIONS="--inspect-brk" ts-node foo.ts # 💥
I think it’s because ts-node starts a child process, and because of that, we get an “address already in use” error. See the Node.js help issue attached.
Just try it for yourself and you will see the problem.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Configuration | ts-node - TypeStrong · GitHub
ts -node supports a variety of options which can be specified via tsconfig.json, as CLI flags, as environment variables, or programmatically.
Read more >Unknown file extension ".ts"' error even with "ts-node/esm ...
i'm using same configuration like yours but it only work when i downgrade to ts-node@9, and then i tried this option in my...
Read more >Source maps in Node.js. Supporting the many flavors of…
Along with addressing bugs with code coverage, this work created a foundation for adding further source map support to Node.js. Applying source ...
Read more >node err_unknown_file_extension - You.com | The AI Search ...
Unknown file extension ".ts" error appears when trying to run a ts-node script ... ts" ]. One of these two options should work,...
Read more >Command-line API | Node.js v19.3.0 Documentation
That path is then resolved by CommonJS module loader. If no corresponding file is found, an error is thrown. If a file is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

https://github.com/TypeStrong/ts-node/pull/499 Would allow you to use NODE_OPTIONS off the bat instead of using TS_NODE_OPTIONS
Closing with https://github.com/TypeStrong/ts-node/pull/536 as I won’t be supporting the subprocess behaviour anymore.