Install electron with Error: Install EACCES: permission denied, mkdir ‘/usr/lib/node_modules/electron/electron-tmp-download-4860-1517066058438’

Cause: The permission is insufficient.

Solution:

  • 1. Switch to user root

  • Unsafe-perm =true –allow-root

    Sudo -i switch to root sudo NPM install -g electron --unsafe-perm=true --allow-rootCopy the code

-s –unsafe-perm=true –allow-root, allow-root, allow-root, allow-root, allow-root, allow-root, allow-root