Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git is not installed or not in the PATH

Windows, when I try to run npm install, it shows:

[email protected] postinstall E:\mean node node_modules/grunt-cli/bin/grunt install Running "bower:install" (bower) task  Fatal error : git is not installed or not in the PATH npm ERR! weird error 1 npm ERR! not ok code 0 

What is the problem? How to fix it?

The project git repository is https://github.com/linnovate/mean

like image 213
lilyH Avatar asked Oct 10 '13 08:10

lilyH


People also ask

Why git is not installed?

Make sure you are in the correct directory. Show activity on this post. Install git and tortoise git for windows and make sure it is on your path, (the installer for Tortoise Git includes options for the command line tools and ensuring that it is on the path - select them).

How do I know if git is installed or not?

Open the command prompt "terminal" and type git version to verify Git was installed.

Where is git installed?

The default path is “C:\Program Files\Git“. If you want the software installed in a different location click Browse and specify a different folder.

Where is git installed Linux?

Git is by default installed under /usr/bin/git directory on recent Linux systems.


2 Answers

Did you install Git correctly?

According to the Bower site, you need to make sure you check the option "Run Git from Windows Command Prompt".

I had this issue where Git was not found when I was trying to install Angular. I re-ran the installer for git and changed my setting and then it worked.

enter image description here

From the bower site: http://bower.io/

like image 194
VtoCorleone Avatar answered Sep 28 '22 20:09

VtoCorleone


while @vitocorleone is technically correct. If you have already installed, there is no need to reinstall. You just need to add it to your path. You will find yourself doing this for many of the tools for the mean stack so you should get used to doing it. You don't want to have to be in the folder that holds the executable to run it.

  • Control Panel --> System and Security --> System
  • click on Advanced System Settings on the left.
  • make sure you are on the advanced tab
  • click the Environment Variables button on the bottom
  • under system variables on the bottom find the Path variable
  • at the end of the line type (assuming this is where you installed it)

    ;C:\Program Files (x86)\git\cmd

  • click ok, ok, and ok to save

This essentially tells the OS.. if you don't find this executable in the folder I am typing in, look in Path to fide where it is.

like image 37
Daniel Egan Avatar answered Sep 28 '22 20:09

Daniel Egan