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
If you absolutely must use --compilerOptions / -O, then be aware you're at the mercy of your shell's ability to parse quotes and backslashes. This is particularly difficult when using Windows shells, either cmd or PowerShell.
The important thing to remember: ts-node must receive a string of valid JSON. On windows, the string passes through both your shell and a .cmd shim before reaching ts-node.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Firstly, instead of using
--compilerOptions
/-O
, I recommend placing those overrides in your tsconfig.json. They will not affecttsc
, only ts-node.Follow the instructions here:
https://typestrong.org/ts-node/docs/configuration#via-tsconfigjson-recommended
If you absolutely must use
--compilerOptions
/-O
, then be aware you're at the mercy of your shell's ability to parse quotes and backslashes. This is particularly difficult when using Windows shells, either cmd or PowerShell.The important thing to remember: ts-node must receive a string of valid JSON. On windows, the string passes through both your shell and a
.cmd
shim before reaching ts-node.I have written a debugging guide here:
#1182
Beta Was this translation helpful? Give feedback.
All reactions