2015-12-01 34 views
0

我正在使用安装了git和节点的windows 10。运行:'错误:未找到:git'代码:'ENOGIT'安装bower时

npm install -g bower 

resulsts在

npm WARN addRemoteGit Error: not found: git 
npm WARN addRemoteGit  at F (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:78:19) 
npm WARN addRemoteGit sheerun/fs-write-stream-atomic#v1.0.4-fix resetting remote C:\Users\Muhammet Akkus\AppData\Roaming\npm-cache\_git-remotes\git-github-com-sheerun-fs-write-stream-atomic-git-v1-0-4-fix-7baaaaefc7e8a6f2fd1f4fdbc8e4b6e7 because of error: { [Error: not found: git] code: 'ENOGIT' } 
npm ERR! git clone --template=C:\Users\Muhammet Akkus\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/sheerun/fs-write-stream-atomic.git C:\Users\Muhammet Akkus\AppData\Roaming\npm-cache\_git-remotes\git-github-com-sheerun-fs-write-stream-atomic-git-v1-0-4-fix-7baaaaefc7e8a6f2fd1f4fdbc8e4b6e7: undefined 

....

回答

1

安装Git和NPM运行安装从混帐的bash为我工作。确保你在正确的目录中。

多参考这里解决 git is not installed or not in the PATH

+0

虽然此链接可以回答这个问题,最好是在这里有答案的主要部件,并提供链接以供参考。如果链接页面更改,则仅链接答案可能会失效。 –

3

你应该尝试以root身份运行此命令。在Windows中,开始你的CommandLine为管理员和在Mac或Linux上使用

sudo npm install -g bower 
+0

不鼓励使用sudo和节点模块。 –

相关问题