tsc not recognized after global install inside Windows Sandbox

42 Views Asked by At

I installed globally as told here https://code.visualstudio.com/docs/typescript/typescript-compiling

npm install -g typescript

both inside vscode and outside, though it installed, tsc --version doesn't work : tsc is not recognized.

I have no problem outside Windows Sandbox https://learn.microsoft.com/en-us/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview

So is there a fix in this context ?

1

There are 1 best solutions below

0
Avinash gupta On

you need to update the typescript with this command

npm install typescript@latest -g

then tsc will be recognized

tsc --init

source : https://bobbyhadz.com/blog/typescript-tsc-command-not-found