1 - Find the path to npm's directory:
$ npm config get prefix
2 - Change the owner of npm's directories to the name of the current user (your username!):
$ sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,share}
Based on https://docs.npmjs.com/getting-started/fixing-npm-permissions