1// After installation/upgrading node via brew I ran into this issue exactly: the node command worked but not the npm command.
2// I used these commands to fix it.
3// From: https://stackoverflow.com/questions/5056115/how-to-install-latest-version-of-node-using-brew
4
5brew uninstall node
6brew update
7brew upgrade
8brew cleanup
9brew install node
10sudo chown -R $(whoami) /usr/local
11brew link --overwrite node
12brew postinstall node