You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Psychosynthesis This has been discussed many times before, but the short of it is: not possible because we don't spawn a subprocess. Doing so adds extra complexity for users and maintainers, and incurs a performance penalty.
@benallfree I was using a previous version of ts-node: ^1.0.0-pre.39. It stopped working when I updated to ^1.1.8 Now I have to find another way or rollback to that version...
Activity
blakeembrey commentedon Nov 19, 2017
Feel free to submit a PR. It would need to be added to
ts-node/src/bin.ts
Line 19 in c57ded2
Support trace-warnings flag, TS_NODE_OPTIONS
stelcheck commentedon Dec 10, 2017
@bitliner made a PR to add the flag, see #476
blakeembrey commentedon Dec 14, 2017
@stelcheck If you can split out this issue with the other one, I can merge one before the other. Thanks!
stelcheck commentedon Dec 15, 2017
Done.
kateile commentedon Aug 23, 2019
@stelcheck how to use it?
I tried adding script in package.json as
"dev": "ts-node --trace-warnings src/server.tsx",but i get error when run it
stelcheck commentedon Aug 26, 2019
Have a look at https://medium.com/the-node-js-collection/node-options-has-landed-in-8-x-5fba57af703d - this should allow you to define Node.JS flags and options through environment variables.
Elyx0 commentedon Jul 16, 2020
Doesn't work @stelcheck still getting the error on --trace-warnings
Elyx0 commentedon Jul 16, 2020
For future reference, this worked
LeonardoRick commentedon Sep 30, 2020
should I be able to run
ts-node --trace-warningsin 2020?cspotcode commentedon Sep 30, 2020
In 2020 specifically, you're supposed to do this: #465 (comment)
If you find yourself in 2019, you might need to do something else.
Psychosynthesis commentedon Nov 30, 2020
It work, but looks awful. Why can't just add a parameter to the ts-node section in the config?
cspotcode commentedon Nov 30, 2020
@Psychosynthesis This has been discussed many times before, but the short of it is: not possible because we don't spawn a subprocess. Doing so adds extra complexity for users and maintainers, and incurs a performance penalty.
LeanKhan commentedon Jul 25, 2021
ts-node-dev --trace-warnings --respawn --transpileOnly ./src/server.tsI use this and it works 🤔
benallfree commentedon Aug 11, 2021
@LeanKhan Doesn't work. When I run it, I get:
LeanKhan commentedon Aug 20, 2021
@benallfree I was using a previous version of ts-node:
^1.0.0-pre.39. It stopped working when I updated to^1.1.8Now I have to find another way or rollback to that version...aymantaybi commentedon Sep 29, 2022
for anyone who wants to run ts-node and print stack trace for unhandled promise exceptions.
node --loader ts-node/esm --trace-warnings exemple/index.ts
make sure to have ts-node installed as a dev dependency.
amanjha8100 commentedon Oct 4, 2023
I still get error with this --trace-warnings flag. Has no one fixed it yet.
rafalfigura commentedon May 5, 2025
I was able to achieve that with env variable: