I have managed to corrupt my npm install, and whenever I try to install packages using npm install, I receive error messages along these lines:
npm
npm install
This one works for me:
sudo chown -R $(whoami) ~/.npm
I did not use the -g because I am the only user. I used a MacBook Air.
-g