Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Electron JS install error - Error: EACCES: permission denied

getting error while installing ElectronJS,

Error:

Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/electron/.electron'

command tried,

sudo npm install -g electron
sudo npm install -g electron-prebuilt

how to resolve this permission issue?

like image 652
Mohideen bin Mohammed Avatar asked Nov 12 '17 09:11

Mohideen bin Mohammed


People also ask

What is Eacces permission denied?

It looks like you're running into permission issues. If you are installing npm-packages then it might possible that you are getting an EACCES error when trying to install a package globally. This means you do not have permission to write to the directories npm uses to store global packages and commands.


1 Answers

You can try with the following command

sudo npm install -g electron --unsafe-perm=true --allow-root

i hope it will be work

like image 57
Shobhit Sharma Avatar answered Sep 18 '22 11:09

Shobhit Sharma