npm安装无法执行postinstall脚本bower安装

npm安装无法执行postinstall脚本bower安装,npm,bower,Npm,Bower,我在网上窥探了48个多小时&没能解决这个问题 当我运行命令“npm install”时,它无法执行安装后脚本“bower install”。因此,我使用以下方法进行了显式bower安装: $npm install -g bower $bower install 在此之后,“app/bower_components”文件夹被正确填充。但是,当我再次尝试“npm安装”时,同样的问题。无法继续 我执行了以下操作&未成功安装: Git已安装&其路径已添加到path环境变量中。然后运行“npm安装”。

我在网上窥探了48个多小时&没能解决这个问题

当我运行命令“npm install”时,它无法执行安装后脚本“bower install”。因此,我使用以下方法进行了显式bower安装:

$npm install -g bower

$bower install
在此之后,“app/bower_components”文件夹被正确填充。但是,当我再次尝试“npm安装”时,同样的问题。无法继续

我执行了以下操作&未成功安装:

  • Git已安装&其路径已添加到path环境变量中。然后运行“npm安装”。甚至重新启动命令提示符,以便PATH变量能够反映
  • 运行“npm install restify”,尽管我不知道为什么安装必须使用REST服务。 我用了这个,因为这是我遇到的建议之一
  • 在一些帖子中,有人提到这可能是由于防火墙设置。禁用相同的并尝试
  • 已将我的项目“angular phonecat”下的所有文件更改为具有读写权限。为此,取消选中整个文件夹内容的“只读”选项
  • 以管理员身份运行gitbash并尝试“npm安装”
  • 请帮助我运行此应用程序:(

    在下面找到我的日志:

    600 info install angular-phonecat@0.0.0  
    601 info postinstall angular-phonecat@0.0.0  
    602 verbose unsafe-perm in lifecycle true  
    603 info angular-phonecat@0.0.0 Failed to exec postinstall script  
    604 error angular-phonecat@0.0.0 postinstall: `bower install`  
    604 error spawn ENOENT  
    605 error Failed at the angular-phonecat@0.0.0 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
    是您自己创建的模块——您能否发布其
    package.json
    作为要点,并在此处附加链接

    另外,您的
    npm
    相当旧(甚至在您提出这个问题时也是如此)。我建议您更新到
    npm
    的最新版本,在本文中是2.2.0

    要在Windows上更新npm,请按照以下说明操作:

    谢谢!

    尝试模块测试是否有过时的组件