找不到 Typescript 编译器:命令“tsc"无效 [英] Can't find Typescript compiler: Command "tsc" is not valid
问题描述
刚刚安装了 VS2012 的 Typescript 扩展,然后按照安装 Visual Studio 2012 的 TypeScript 然后tutorial 调用编译器:
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
但是当我尝试编译 .ts 文件时,我应该在哪里输入:tsc greeter.ts
?在 VS 命令行和 Windows 控制台中尝试过,总是得到 tsc 未被识别为命令的消息(Command "tsc" is not valid.
).
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.
).
推荐答案
确保您拥有,
C:\Program Files (x86)\Microsoft SDKs\TypeScript\0.8.0.0
或者,
C:\Program Files\Microsoft SDKs\TypeScript\0.8.0.0
在你的路上.如果没有,请尝试重新启动 CMD.EXE
并查看是否显示新副本.如果失败,请尝试手动将上述之一添加到您的路径中.
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.
这篇关于找不到 Typescript 编译器:命令“tsc"无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!