npm安装无法执行exec安装后脚本bower安装

问题描述:

我在网络上探听超过48小时&未能解决此问题。npm安装无法执行exec安装后脚本bower安装

当我运行'npm install'命令时,它无法执行postinstall脚本'bower install'。所以,我做了我一个明确的凉亭通过使用安装:

$npm install -g bower 

$bower install 

在此之后,“应用程序/ bower_components”文件夹中得到了填充好的。但是,当我尝试'npm install'时,同样的问题。无法继续进行。

我执行了以下&并没有安装成功:

  1. Git是安装&其在PATH环境变量添加的路径。然后运行'npm install'。即使重新启动了命令提示符以使PATH变量反映出来。
  2. 运行'npm install restify',虽然我不知道为什么安装必须作为REST服务。 我用过这个,因为这是我遇到的建议之一。
  3. 在某些文章中,有人提到它可能是由于防火墙设置。同样尝试了&。
  4. 更改我的项目'angular-phonecat'下的所有文件具有读写权限。这是通过取消选中整个文件夹内容的“只读”选项来实现的。
  5. 以管理员身份运行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 ] 

你需要为了得到这个问题的答案提供更多的信息,它看起来像angular-phonecat是创建自己的模块 - 你也可以。请公布了其作为依据https://gist.github.compackage.json并在此附上的链接?

此外,您npm是比较旧的(甚至还被你问这个问题的时候)。我想建议更新到的npm最新版本,在写这篇文章时是2.2.0。

要在Windows更新NPM,请按照下列指示:https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

谢谢!

尝试npm-check模块测试是否有任何组件过时