How come npm install doesn't work on git bash

前端 未结 13 1223
天涯浪人
天涯浪人 2020-12-07 19:00

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

13条回答
  •  情话喂你
    2020-12-07 19:43

    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!

提交回复
热议问题