0x49D1 0x49D1 - 17 days ago 9
Javascript Question

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

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

Ensure you have,

C:\Program Files (x86)\Microsoft SDKs\TypeScript\0.8.0.0

or,

C:\Program Files\Microsoft SDKs\TypeScript\0.8.0.0

on your path. If not, try restarting CMD.EXE and see if shows up with a fresh copy. If that fails, try adding one of the above manually to your path.

Comments