2

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 ?

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
user310291
  • 36,946
  • 82
  • 271
  • 487
  • What is output of: `npm config get prefix` and `npm ls -g --depth 0`? Is the "prefix" directory contained in PATH environment variable? – JeffRSon Apr 13 '23 at 11:04

1 Answers1

0

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