已安装Git并在路径中。

平台:Red Hat Enterprise Linux 5.8。

>which git
/usr/local/bin/git

然而鲍尔却找不到它:

bower angular#1.0.6  ENOGIT git is not installed or not in the PATH

建议的解决方案是什么?


当前回答

我有同样的问题,需要重新启动cmd -问题消失了。

其他回答

1.在环境变量中设置Git的路径。 2.在Windows命令提示符中, 运行cd项目\文件夹\路径\ 执行命令:bower install

NPM安装从git bash为我工作。 重启电脑后。

我在一台cPanel CentOS 6 linux机器上遇到了这个问题。 我的解决方案是将cPanel git符号链接到/usr/local/bin/git

ln -s /usr/local/cpanel/3rdparty/bin/git /usr/local/bin/git

我通过从下载Git Bash安装Git Bash解决了这个问题。

在安装软件时设置此选项3,如下图所示。

最后使用Bash右键单击选择项目文件夹,如下所示。

和类型

npm安装

. 这对我很管用。

只需使用Git Bash,而不是node.js或命令提示符

以安装ReactJS为例,打开Git Bash后,执行以下命令安装react:

bower install --react