Global Node modules not installing correctly. Command not found

前端 未结 9 1060
北荒
北荒 2020-11-29 20:26

I am having a problem installing global node modules and everything I find online says the solve is just adding -g. Which is not the problem. I believe it\'s a linking issue

9条回答
  •  借酒劲吻你
    2020-11-29 20:41

    This may mean your node install prefix isn't what you expect.

    You can set it like so:

    npm config set prefix /usr/local

    then try running npm install -g again, and it should work out. Worked for me on a mac, and the solution comes from this site:

    http://webbb.be/blog/command-not-found-node-npm/

    EDIT: Note that I just came across this again on a new Mac I'm setting up, and had to do the process detailed here on stackoverflow as well.

提交回复
热议问题