node.js - 即使在安装了 git 和 stackoverflow 中给出的路径变量后,安装 Bower 组件时仍出现“未安装 Git 或未指定路径”

标签 node.js git github npm bower

我正在开发一个需要 Git 的 Bower 组件的项目,即使我的系统中有 GIT,它也没有安装。我还设置了 git/cmd 的路径。

配置为:Windows7; GIT是2.7.0.windows1,路径是programfiles/git/cmd

我也尝试过 Stackoverflow 中给出的各种解决方案,但没有解决我的问题。我的一个有趣的观察是 user/appdata 中没有 git

系统中还安装了npm。请建议我解决此问题。

git not in the path , the git terminal

最佳答案

Bower 在其“Windows Users ”部分中明确指出:

To use Bower on Windows, you must install Git for Windows correctly. Be sure to check the options shown below:

https://cloud.githubusercontent.com/assets/10702007/10532690/d2e8991a-7386-11e5-9a57-613c7f92e84e.png

https://cloud.githubusercontent.com/assets/10702007/10532694/dbe8857a-7386-11e5-9bd0-367e97644403.png

This issue确认:

I've encountered the same issue before,
I just re-install everything and followed these instructions.

Firstly I installed Git then install bower , it fixes my problem.

或者,至少在你的 bower 命令之前:

set PATH=%PATH%;C:\Program Files (x86)\Git\bin;

关于node.js - 即使在安装了 git 和 stackoverflow 中给出的路径变量后,安装 Bower 组件时仍出现“未安装 Git 或未指定路径”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35333072/

相关文章:

javascript - 如何在 JavaScript/node.js 中删除 HTTP 响应 header 中的无效字符?

javascript - 使用 mocha 的内置 promise 支持测试失败的 promise

ruby-on-rails - 运行命令 'git remote' 以部署 Ruby on Rails 应用程序时出现问题

javascript - 如何使用 Github API 从存储库中的目录获取文件名

javascript - 如何在 NodeJS mongodb 驱动程序版本 2.2 中使用 Promise

ios - 不正确的行为 git 子模块

GitLab CI-添加标签时避免构建

git rebase 在长期(远程)功能分支上

git - 删除 Github 提交历史

node.js - 带有 Meteor 的子进程