2016-10-18 247 views
0

我正在關注本教程enter link description here,但我在12:41卡住了。我下載下面的視頻原文鏈接種子項目,並在Windows 7發行somman npm install作爲管理員,但我發現了以下錯誤:npm安裝失敗,出現錯誤

C:\development\angular2\angular2-seed>npm install 

> [email protected] postinstall C:\development\angular2\angular2-seed 
> typings install 

(I translated following lines to English) 
typings is not name of an command, executable or batch. 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules\ch 
okidar\node_modules\fsevents): 
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected] 
1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64" 
}) 
npm WARN [email protected] No description 
npm WARN [email protected] No repository field. 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\A 
ppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" 
npm ERR! node v4.6.0 
npm ERR! npm v3.10.8 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] postinstall: `typings install` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'typings ins 
tall'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the angular2-quickstart p 
ackage, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  typings install 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs angular2-quickstart 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls angular2-quickstart 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\development\angular2\angular2-seed\npm-debug.log 

請指教。謝謝。

編輯: 附加文件NPM-的debug.log:enter link description here 附加文件的package.json:enter link description here

+0

請附上package.json文件。 –

+0

種子項目使用非常古老的angular2版本'「2.0.0-beta.7」'。我建議你參考這個快速入門文章 - https://angular.io/docs/ts/latest/quickstart.html – Sanket

+0

@ParveenSachdeva我將npm-debug.log附加到我的問題中。謝謝。 – Vojtech

回答

3

權限問題。它可能與窗口中的路徑名有關。

檢查Git Bash或Windows Powershell中的相同。

您可以設置像節點路徑:set NODE_PATH=source

取出node_modules並再次運行npm install

+0

我以管理員身份使用Git Bash,設置了環境變量NODE_PATH,刪除了node_modules,但不幸的是問題依然存在。謝謝。 – Vojtech

+0

請顯示您的package.json文件。將有助於更容易地調試。 – Anistark

+0

附加,請參閱我的問題的編輯。謝謝。 – Vojtech