Installation ';错误:未找到:git';代码:';ENOGIT';安装凉亭时

Installation ';错误:未找到:git';代码:';ENOGIT';安装凉亭时,installation,bower-install,Installation,Bower Install,我使用的是安装了git和node的Windows10。运行: npm install -g bower 结果 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-st

我使用的是安装了git和node的Windows10。运行:

npm install -g bower
结果

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

..

安装git并从git bash运行npm安装对我来说很有用。确保您位于正确的目录中

有关解决方案,请参阅此处的更多信息

安装git并从git bash运行npm安装对我来说很有用。确保您位于正确的目录中

有关解决方案,请参阅此处的更多信息

您应该尝试以root用户身份运行此命令。在Windows上,以管理员身份启动命令行,并在Mac或Linux下使用

sudo npm install -g bower 

您应该尝试以root用户身份运行此命令。在Windows上,以管理员身份启动命令行,并在Mac或Linux下使用

sudo npm install -g bower 

我使用windows,当我想安装react-native router flux时,我也遇到了同样的问题,对于我来说,当我使用git bash而不是命令行来安装它时,问题就解决了,我希望这对您有所帮助。

我使用windows,当我想安装react-native router flux时,我也遇到了同样的问题,对于我来说,当我使用git bash而不是命令行安装它时,这个问题就解决了,我希望这对您有所帮助。

虽然这个链接可以回答这个问题,但最好在这里包含答案的基本部分,并提供链接供参考。如果链接页面发生更改,仅链接的答案可能会无效。虽然此链接可以回答问题,但最好在此处包含答案的基本部分,并提供链接以供参考。如果链接页面发生更改,则仅链接的答案可能无效。不建议将sudo与节点模块一起使用。不建议将sudo与节点模块一起使用。