If you’re using sudo with npm you’re doing it wrong

from blog Oliver Caldwell's blog, | ↗ original
I see countless developers blindly firing off sudo npm install -g XYZ and it hurts. A lot. From then on, every time you update or execute global npm commands from within scripts or tools the whole thing will halt or die when it encounters permission related problems. One “solution” I’ve seen for this is to chmod /usr/local. You don’t own this...