-
Notifications
You must be signed in to change notification settings - Fork 127
Installing globally on darwin fails with EACCESS #48
Comments
I have the same problem, i'm running with sudo command but a received EACCES.
|
Any update on this? I even totally reinstalled node but the problem seems to remain. |
This is a hard one to reproduce, as it seems to only affect a very small number of OS X users. What happens when you install, in a nutshell:
You can run it with |
Yeah I guess somehow the permissions are messed up and I'm doing |
I'm not a big mac guy so I'm not sure what's wrong with my environment but I'll try to add some context to see if anything helps. Someone game me their old mac to use. There was already a main account on the mac, I was added as a user later and set as an administrator. I can sudo. Whenever I install an npm package globally I have to sudo (e.g. Here is the error with the debugging information you asked for:
Info on the directories mentioned here:
Surprisingly though:
Maybe node is cleaning it up after the failure, I'm not sure. But everthing in that |
I solved this problem by removing |
This was fixed at some point. |
I solved by npm install locally ;then, npm global intall again |
had the same problem. Solved with this: then it worked |
sudo npm install -g electron-prebuilt --unsafe-perm=true --allow-root The error is on "El Capitan" OSX 10.11.4 |
Thanks jctovar, that worked for me. This should be fixed or documented somewhere |
Thank you ariu! It worked :) |
sudo npm install -g electron
/usr/local/lib/node_modules/electron/install.js:47 Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/electron/.electron' npm ERR! A complete log of this run can be found in: Ubuntu 17.04 |
#139 you can look this problem, I fixed it use |
Ебаное говно!
|
As pointed out above
|
I just want to add that you probably no longer need to, and probably should not, install any packages globally ever again. Always prefer local install only. To use a locally installed command use package.scripts or npx. For both cases: npm install electron Then invoking it from npm, add to your {
"scripts": {
"electron": "electron $*"
}
} then npm run electron Or with npx: npx electron Avoid global installs as it will affect all repositories and you can have confusing version conflicts and you'll have to manually update it constantly if other people update the version in the repo. There is no good reason to do global installs ever again, as far as I know. |
We've been burned by this a couple of times but to install globally you have to do
sudo npm install electron-prebuilt -g
and it seems like it's attempting to copy a temp file from a root folder into a user folder that it doesn't have access to.The work around is to install electron-prebuilt locally once,
npm install electron-prebuilt
to get the binary into the user folder cache, then install globally.I just wanted to point this out, it would be nice if this error didn't happen, it's not blocking me though.
The text was updated successfully, but these errors were encountered: