我正在尝试在全球范围内安装电子设备,但是我遇到了这个令人讨厌的错误消息
/home/tbh/.npm-global/bin/electron -> /home/tbh/.npm-global/lib/node_modules/electron/cli.js
> electron@2.0.8 postinstall /home/tbh/.npm-global/lib/node_modules/electron
> node install.js
/home/tbh/.npm-global/lib/node_modules/electron/install.js:54
throw err
^
Error: EACCES: permission denied, mkdir '/home/tbh/.npm-global/lib/node_modules/electron/dist'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@2.0.8 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@2.0.8 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
我已经尝试了几件事,包括使用sudo运行它,以及更改了Stackoverflow上针对此问题的NPM配置 但是对我没有用 如果有人需要此问题的日志,可以在这里here找到它 PS:我的操作系统是Ubuntu 18.04
答案 0 :(得分:2)
尝试使用以下方式安装:scale=
。
来源:https://github.com/electron/electron/issues/10604#issuecomment-333368230