[英]Electron-builder: EACCES: permission denied
I have tried to package my electron app on mac using electron-builder. 我试图使用electron-builder将我的电子应用程序打包在mac上。 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
主流程中发生JavaScript错误
Uncaught Exception:
未捕获的异常:
Error: EACCES: permission denied, mkdir
错误:EACCES:权限被拒绝,mkdir
I have not found any similar errors related to electron-builder and it also works just fine for windows. 我还没有发现与电子生成器相关的任何类似错误,并且它也适用于Windows。 I have also tried 'sudo'.
我也尝试过“ sudo”。
Thanks in advance for any help. 在此先感谢您的帮助。
First, try uninstalling electron with the npm uninstall command. 首先,尝试使用npm uninstall命令来卸载electronic。
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.