Node JS NPM modules installed but command not recognized

前端 未结 6 785
我寻月下人不归
我寻月下人不归 2020-12-12 20:21

Node JS and NPM was working well before. Recently I have re-installed the Node JS, NPM and the problem started. After I install a module like example npm install -g bo

6条回答
  •  攒了一身酷
    2020-12-12 20:50

    I had this same problem and fixed it by adding the 'npm' directory to my PATH:

    Right click 'My Computer' and go to 'Properties > Advanced System Settings > Environment Variables'.

    Double click on PATH under the 'User variables for Username' section, and add 'C:\Users\username\AppData\Roaming\npm' obviously replacing 'username' with yours. Based on comments below, you may need to add it to the top/front of your path.

    Restart your console window or IDE and you should get a response from the bower command.

提交回复
热议问题