0
在新计算机上设置项目并遇到Typescript版本控制问题。我曾尝试:Typescript安装/版本错误:术语'tsc'未被识别
npm install -g typescript
npm install typescript
npm install -g [email protected]
npm install -g [email protected]
但每次我尝试使用检查版本:
tsc -v
我收到以下错误:
The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path wa
s included, verify that the path is correct and try again.
At line:1 char:4
+ tsc <<<< -v
+ CategoryInfo : ObjectNotFound: (tsc:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
作为参考,包括的package.json :
"scripts": {
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings",
"gulp": "gulp",
"build-dev": "gulp",
},
"devDependencies": {
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-inline-ng2-template": "^4.0.0",
"gulp-typescript": "^3.0.2",
"path": "^0.12.7",
"systemjs-builder": "^0.15.26",
"typescript": "^2.1.6",
"typings": "^2.0.0"
}
当我ru ñTSC -v我的机器上(这是工作)我得到
Version 2.0.10
憋屈什么,我需要做的安装打字稿,使得TSC命令被认可?