How come npm install doesn't work on git bash

damien9999 picture damien9999 · Mar 10, 2016 · Viewed 88.1k times · Source

I have git bash open and I type in npm install and then it returns:

bash: npm command not found

I don't understand, because I have node.js command prompt and when I type in npm -v then it returns 3.7.3. How come it doesn't work in git?

Answer

Ben picture Ben · Jan 10, 2018

In our case, the solution was simply to close the Git bash window and re-open it.