Can't find Typescript compiler: Command "tsc" is not valid

0x49D1 picture 0x49D1 · Oct 2, 2012 · Viewed 101.5k times · Source

Just installed Typescript extension to VS2012 and followed Install TypeScript for Visual Studio 2012 and then the tutorial to call the compiler:

> tsc greeter.ts

But when i try to compile .ts file where should i type: tsc greeter.ts? Tried it in VS command line and in windows console, always get the message that tsc is not recognized as command(Command "tsc" is not valid.).

Answer

lhk picture lhk · Jan 19, 2013

If you're using tsc as a node module, make sure you've installed it with

npm install -g typescript

Then it should be available globally in your node command prompt