mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Getting EACCES: permission denied error on electronize start on MacOS #385
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mika76 on GitHub (Sep 18, 2019).
Steps to Reproduce:
electronize initworked fineelectronize start@mika76 commented on GitHub (Sep 18, 2019):
I also tried it via
sudo electronize startbut it was the same...@netpoetica commented on GitHub (Oct 8, 2019):
Hey @mika76, where did you install node & npm from? Did you use homebrew? I am concerned that maybe you have somewhere in your chain used
sudoto install (maybe node/npm, maybe nvm or some version manager).Additionally, based on this particular error, it looks like it is the dotnet-generated folders that have permissions problems. EACCES error came from obj/Host/node_modules, so either the permissions are messed up on node_modules dir, or one of the ones up the chain.
You should be able to use
ls -lashon those folders and see what the actual permissions are, vs. what they should be. Maybe you will see one of them hasrootinstead of your your username?@mika76 commented on GitHub (Oct 9, 2019):
Hey @netpoetica, thanks for taking a look.
You're right, all the folders in obj/Host/node_modules are owned by root. As for npm, I honestly don't remember - it might have been through brew.
How can I fix this? re-install node and npm manually or something?
@mika76 commented on GitHub (Oct 9, 2019):
doing a
brew info npmresults in@netpoetica commented on GitHub (Oct 15, 2019):
It is possible that you installed homebrew using sudo, which then causes you to need to use sudo when brew installing, at which point npm thinks you're a root user or something.
In this particular case, you can just chown -R those directories to your use instead.
In the long run, I recommend uninstalling node & npm completely, maybe uninstalling homebrew even, just making sure that you don't have any of that stuff installed with sudo. You may be able to find some online resources about changing all of these permissions without re-installing, but I personally am worried you might be setting yourself up for many more similar such issues in the future.
@mika76 commented on GitHub (Oct 15, 2019):
Thanks @netpoetica I'll attempt to clean it all up
@mika76 commented on GitHub (Oct 15, 2019):
I guess this issue can be closed also, since it's something on my machine... Thanks for all your help.
@mika76 commented on GitHub (Oct 17, 2019):
Just as an update if anybody hits the same issue a me - I used the following article to uninstall npm and install it using nvm which manages node and npm versions better than things like homebrew: https://ajaykarwal.com/uninstall-node-and-install-nvm/
Works like a dream now...