Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error not found: git when install npm package on windows

Tags:

git

npm

window

I'm trying to install this package through npm npm install bigwheel on windows using webstorm IDE.

I'm getting

"Error: not found: git" "This is most likely not a problme with npm itself. Please check if you have git installed and in yout Path"

I have https://git-for-windows.github.io/ installed, how do i check the path and fix this error?

like image 658
Adam Avatar asked Jun 06 '17 11:06

Adam


People also ask

Can you install Git with npm?

npm install git doesn't install git (i.e. the command line tool to manipulate git repositories). It installs the npm package called git which seems to be a JavaScript library to interact with git repositories (which makes the name accurate, but still misleading). npm is not a general-purpose package manager.

Why is npm not installing?

The Npm command not found error can appear when you install or upgrade npm. On Windows, the cause of this error could be that a PATH or system variable is not correctly set. The error can also occur if you do not have npm or Node. js installed, have an outdated version, or have permission issues.

How do I install Git in Windows CMD?

To install Git, navigate to your command prompt shell and run the following command: sudo dnf install git-all . Once the command output has completed, you can verify the installation by typing: git version .


1 Answers

Please find at which location on your machine git is installed. e.g. C:\Program Files\Git\cmd and append this to your PATH variable in environment variables.

To append to path please follow below steps:

  1. Right click on This PC or My Computer & select Properties
  2. Select Advanced System Settings
  3. Select Environment Variables
  4. In System Variables locate PATH variable
  5. Select Edit and append this path
  6. Click OK & restart command prompt

Execute below command from new command prompt after appending this:

git --version

It should display something like:

git version 2.9.0.windows.1

After following these steps, try to install npm package and see whether the problem is resolved.

like image 149
kk. Avatar answered Oct 06 '22 02:10

kk.