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命令被認可?