Bower : ENOGIT git is not installed or not in the PATH

在用bower安装jquery库时报错,Bower : ENOGIT git is not installed or not in the PATH 

因此下载安装git: https://git-for-windows.github.io/

安装完成后重新执行bower install jquery 仍然报错,原因是git没有设置在环境变量中。

 

解决方法一:

添加git到环境变量中,设置path路径为 C:\Program Files\Git\bin(和设置java环境变量的操作类似,不再演示)

计算机右键——属性——(左侧)高级系统设置——环境变量——点击PATH,编辑——在末尾添加  ;C:\Program Files\Git\bin

 

解决方法二:

在控制台输入如下命令:

set PATH=%PATH%;c:\Program Files\Git\bin

再次运行

bower install jquery

 

posted @ 2016-11-15 12:10  淳安梁朝伟  阅读(1009)  评论(0编辑  收藏  举报