Attempting to resolve this question and getting the following error when installing electron globally with NPM:
ole@mki:~/angular-electron$ sudo npm inst
As npm proposes:
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
source ~/.profile
By doing it this was you keep your global npm packages scoped within your user account, instead of shared between all the users in the computer. Even if you're the only user, this is a recommended behavior. :-)