Global Node modules not installing correctly. Command not found

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.

Leave a Comment