Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bower "Git not in the PATH" error

I just installed git and bower via NPM for a project. It's a first time use.

Then I tried running bower install jQuery for example, I get this specific error:

ENOGIT git is not installed or not in the PATH

Where can I actually define paths and how, and when we say PATHs, what's the main idea?

Also, I really need help with some good resources for learning the concept behind this question or learning NPM usage in general.

I'm using windows 7, 64-bit.

like image 896
user1966211 Avatar asked Nov 19 '13 10:11

user1966211


4 Answers

Install msysgit, as stated in the Bower documentation:

To use Bower on Windows, you must install msysgit correctly. Be sure to check the option shown below:

[ ] Use Git bash only

[x] Run Git from the Windows Command Prompt

[ ] Run Git and included Unix tools from the Windows Command Prompt

After the installation has completed, restart CMD. You (and bower) will then be able to run git from the command prompt, which will fix your issue.

like image 88
Paul Mougel Avatar answered Oct 31 '22 22:10

Paul Mougel


Make sure u installed git with 2nd or 3rd option selected from list. It will penetrate git command to cmd by modifying PATH automatically ;)

enter image description here

like image 27
Navid Golforoushan Avatar answered Oct 31 '22 23:10

Navid Golforoushan


Manual method is to add the Git cmd path to your windows PATH environment variable. The Git cmd path will be unique on your machine, and something like:

C:\Users\<YourUserName>\AppData\Local\GitHub\PortableGit_<SomeGuid>\cmd\

From command prompt, add it to your PATH var like so:

path C:\Users\<YourUserName>\AppData\Local\GitHub\PortableGit_<SomeGuid>\cmd\;%PATH%

like image 2
James McCormack Avatar answered Oct 31 '22 23:10

James McCormack


Install Bower using Git Bash and run bower install jQuery from Git Bash. Git doesn't work from Windows command prompt as CMD is not POSIX compatible.

like image 1
Rejoy Avatar answered Oct 31 '22 21:10

Rejoy