How to fix the "Missing write access" error when using npm

Quickly solve this annoying problem when installing global packages using npm