'ts-node' is not recognized as an internal or external command, operable program or batch file is about common problem: the installing of the npm package to the project does not mean the installing of it to PC, thus the OS don't know where to find the command. Here, the global installation and usage of npx
are standard solutions.
But I still got:
'ts-node' is not recognized as an internal or external command, operable program or batch file
when I tried to run ts-node
via npx
.
As you see in the picture below, npx ncu
works well:
I have not run the cowsay
utility previously, so if I run npx cowsay wow
, I will be prompted about installation:
Now, run npx ts-node test.ts
. As you see, npx neither suggested my install it nor executed the existing file text.ts
:
(My Windows 10 is Japanese, so the console output is Japanese too. That output means "'ts-node' is not recognized as an internal or external command, operable program or batch file".)