当我在nodejs和npm cmd提示符中使用npm install时,我遇到了ENOGIT的问题

时间:2015-12-29 15:48:18

标签: angularjs git bower

我不明白为什么我面临这个问题,当我在我的新项目中使用npm install时,它的显示类似于ENOGIT git没有安装在路径中, 但我安装了git,我可以使用git cmd提示符

C:\ Users \ Srikaran \ oxkey-copy \ app> npm install

  

angular-seed@0.0.0 postinstall C:\ Users \ Srikaran \ oxkey-copy   凉亭安装

bower angular #~1.4.0在PATH中未安装ENOGIT git

npm WARN optional Skipping failed optional dependency /karma/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@0.3.8
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Srikaran\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.2.3
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! angular-seed@0.0.0 postinstall: `bower install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-seed@0.0.0 postinstall script 'bower install'.
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 angular-seed package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     bower install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs angular-seed
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular-seed
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Srikaran\oxkey-copy\app\npm-debug.log

C:\Users\Srikaran\oxkey-copy\app>which git
'which' is not recognized as an internal or external command,
operable program or batch file.

1 个答案:

答案 0 :(得分:0)

神!!我修好了。 我在我的节点shell中使用了这个命令,并解决了ENOGIT git错误。

设置PATH =%PATH%; C:\ Program Files \ Git \ bin;

但是当我手动修复该环境变量及其路径时,我无法解决问题,但在节点shell中使用该命令后,它已经修好了。