简体   繁体   中英

Electron-builder: EACCES: permission denied

I have tried to package my electron app on mac using electron-builder. There are no errors while doing so, however, once I try to open the app I get the following error:

A JavaScript error occurred in the main process

Uncaught Exception:

Error: EACCES: permission denied, mkdir

I have not found any similar errors related to electron-builder and it also works just fine for windows. I have also tried 'sudo'.

Thanks in advance for any help.

First, try uninstalling electron with the npm uninstall command.

sudo npm uninstall -g electron

Then reinstall electron with

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

If that doesn't work, you can do the same with node.

sudo npm install -g --unsafe-perm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM