Sudo You $%^&* Snippet!

/ Edit this post

Sometimes I run into this issue when running NPM without sudo causes a bunch of warnings. If this happens to you, just type this into your Mac OSX terminal and run npm again and the warnings disappear.

sudo chown -R `whoami` ~/.npm