我在網絡上探聽超過48小時&未能解決此問題。npm安裝無法執行exec安裝後腳本bower安裝
當我運行'npm install'命令時,它無法執行postinstall腳本'bower install'。所以,我做了我一個明確的涼亭通過使用安裝:
$npm install -g bower
$bower install
在此之後,「應用程序/ bower_components」文件夾中得到了填充好的。但是,當我嘗試'npm install'時,同樣的問題。無法繼續進行。
我執行了以下&並沒有安裝成功:
- Git是安裝&其在PATH環境變量添加的路徑。然後運行'npm install'。即使重新啓動了命令提示符以使PATH變量反映出來。
- 運行'npm install restify',雖然我不知道爲什麼安裝必須作爲REST服務。 我用過這個,因爲這是我遇到的建議之一。
- 在某些文章中,有人提到它可能是由於防火牆設置。同樣嘗試了&。
- 更改我的項目'angular-phonecat'下的所有文件具有讀寫權限。這是通過取消選中整個文件夾內容的「只讀」選項來實現的。
- 以管理員身份運行Git Bash &嘗試'npm install'。
請幫我運行這個程序。 :(
下面找到我的日誌:
600 info install [email protected]
601 info postinstall [email protected]
602 verbose unsafe-perm in lifecycle true
603 info [email protected] Failed to exec postinstall script
604 error [email protected] postinstall: `bower install`
604 error spawn ENOENT
605 error Failed at the [email protected] postinstall script.
605 error This is most likely a problem with the angular-phonecat package,
605 error not with npm itself.
605 error Tell the author that this fails on your system:
605 error bower install
605 error You can get their info via:
605 error npm owner ls angular-phonecat
605 error There is likely additional logging output above.
606 error System Windows_NT 6.2.9200
607 error command "g:\\Workspace\\AngularProjects\\angular-phonecat\\node.exe" "g:\\Workspace\\AngularProjects\\angular-phonecat\\node_modules\\npm\\bin\\npm-cli.js" "install"
608 error cwd g:\Workspace\AngularProjects\angular-phonecat
609 error node -v v0.10.32
610 error npm -v 1.4.28
611 error syscall spawn
612 error code ELIFECYCLE
613 error errno ENOENT
614 verbose exit [ 1, true ]