question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug/feature: ts-node should work with NODE_OPTIONS

See original GitHub issue

This 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:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
stelcheckcommented, Dec 20, 2017

https://github.com/TypeStrong/ts-node/pull/499 Would allow you to use NODE_OPTIONS off the bat instead of using TS_NODE_OPTIONS

0reactions
blakeembreycommented, Feb 19, 2018

Closing with https://github.com/TypeStrong/ts-node/pull/536 as I won’t be supporting the subprocess behaviour anymore.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found