MOVED!!! Guide moved on Aug 6 2019
Recommended setup for bash on macOS (.bashrc, .bash_profile, etc)
Last update: Aug 2019
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
This solution fixes the error caused by trying to run
npm update npm -g. Once you're finished, you also won't need to use
sudo to install npm modules globally.