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
Are you on Windows?
If so, can you go to the Git Bash console and run:
echo $PATH
and then check if the node path(e.g. c/Program Files/node ) is there?
If the node path is not there you'll need to add it to the system path variable.
If it's there, can you try to run npm between double quotes?
"npm"
I had to add node path to system variable AND reboot. For some reason closing and reopening git bash was not enough
If you are on Windows, try this: In CMD, go to folder
C:\Program Files or (x86)\nodejs\
Then try the following
C:\Program Files\nodejs>set path=%PATH%;%CD%
C:\Program Files\nodejs>setx path "%PATH%"
It works for me!
I had the same issue and I successed to solve it by changing the git enviornment system variable from C:\Program Files\Git\cmd to C:\Program Files\Git
Hope that will help someone
You need to define this #!/bin/bash start of you bash script
#!/bin/bash
npm install
If you installed git bash first and then node.js, uninstall gitbash and keep node.js. And then re-install git bash again.
npm --version
node --version
check version using this command