Angularjs 当我在nodejs和npmcmd提示符中使用npm安装时,我对ENOGIT有一个问题

Angularjs 当我在nodejs和npmcmd提示符中使用npm安装时,我对ENOGIT有一个问题,angularjs,git,bower,Angularjs,Git,Bower,我不明白为什么我要面对这个问题,当我在我的新项目中使用npm安装时,它显示出ENOGIT git没有安装在路径中, 但是我已经安装了git,并且我能够使用git cmd提示符 C:\Users\Srikaran\oxkey copy\app>npm安装 棱角的-seed@0.0.0安装后C:\Users\Srikaran\oxkey副本 凉亭安装 bower angular#~1.4.0 ENOGIT git未安装或不在路径中 npm WARN optional Skipping failed

我不明白为什么我要面对这个问题,当我在我的新项目中使用npm安装时,它显示出ENOGIT git没有安装在路径中, 但是我已经安装了git,并且我能够使用git cmd提示符

C:\Users\Srikaran\oxkey copy\app>npm安装

棱角的-seed@0.0.0安装后C:\Users\Srikaran\oxkey副本 凉亭安装

bower angular#~1.4.0 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.
天哪!!我把它修好了。 我在节点shell中使用了这个命令,解决了ENOGIT-git错误

设置路径=%PATH%;C:\ProgramFiles\Git\bin


但是,当我手动修复了环境变量及其路径后,我无法修复问题,但在使用node shell中的命令后,它修复了我的问题。

改用git bash提示符。它说它找不到哪个不是git。这是一个unix命令,您可以使用git bash而不是常规的命令提示符获取它。是的,我也在尝试,但当我使用git bash时,它没有节点和npm,请您帮助我,我知道这一点,您可能会觉得它很傻。您需要在windows path环境变量中添加git.exe的路径;C:\ProgramFiles(x86)\Git\bin;C:\Program Files(x86)\Git\cmd在环境变量中使用此路径,即使我遇到同样的问题