[英]npm install fails with error
我正在關注本教程,在此處輸入鏈接描述,但我在 12:41 卡住了。 我通過視頻說明中的鏈接下載了種子項目,並在 Windows 7 上以管理員身份發布了 somman npm install
。但是我收到以下錯誤:
C:\development\angular2\angular2-seed>npm install
> angular2-quickstart@1.0.0 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: fsevents@^1.0.0 (node_modules\ch
okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"
})
npm WARN angular2-quickstart@1.0.0 No description
npm WARN angular2-quickstart@1.0.0 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! angular2-quickstart@1.0.0 postinstall: `typings install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-quickstart@1.0.0 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
請指教。 謝謝。
權限問題。 它可能與 Windows 中的路徑名有關。
在 Git Bash 或 Windows Powershell 中檢查相同的內容。
您可以設置節點路徑,如: set NODE_PATH=source
刪除 node_modules 並再次運行npm install
。
如果有人在我的情況下面臨這個錯誤並嘗試了這里提到的所有解決方案,以及另一個類似的問題,例如:
你在正確的目錄中
你有一個 package.json 文件,
JSON 有效,
你試過運行 %temp%
您已經嘗試過“npm install -d --save”等。
我的工作是做“npm install --force”
注意:這個錯誤本身也是推薦的,之前沒注意。
甚至“紗線安裝”也有效。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.