简体   繁体   English

npm错误代码ELIFECYCLE,用于安装后的Bower安装

[英]npm error code ELIFECYCLE for postinstall bower install

I am getting the followin error when running npm install: 我在运行npm install时收到followin错误:

66283 error Windows_NT 6.1.7601
66284 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
66285 error node v4.2.1
66286 error npm  v2.14.7
66287 error code ELIFECYCLE
66288 error MyProject@0.0.0 postinstall: `bower install`
66288 error Exit status 1
66289 error Failed at the MyProject@0.0.0 postinstall script 'bower install'.
66289 error This is most likely a problem with the MyProject package,
66289 error not with npm itself.
66289 error Tell the author that this fails on your system:
66289 error     bower install
66289 error You can get their info via:
66289 error     npm owner ls MyProject
66289 error There is likely additional logging output above.
66290 verbose exit [ 1, true ]

I have my environmental variables setup correctly for Python 2.7, git and npm user profile. 我为Python 2.7,git和npm用户配置文件正确设置了环境变量。 My node-gyp is building/rebuilding successfully. 我的node-gyp正在成功构建/重建。 Wondering why is this happening ? 想知道为什么会这样吗?

The issue is with the GIT environment variables. 问题在于GIT环境变量。 Added the following to environment variables (PATH) , it started working. 在环境变量(PATH)中添加了以下内容,它开始工作。

C:\Users\DemoUser\AppData\Local\Programs\Git\bin
C:\Users\DemoUser\AppData\Local\Programs\Git\cmd

Make sure to add both \\bin and \\cmd otherwise it doesn't work with the default \\cmd PATH variable git adds automatically during the installation. 确保同时添加\\ bin和\\ cmd,否则它不能与默认\\ cmd PATH变量一起使用git在安装过程中会自动添加。

Thanks ! 谢谢 !

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM