安装electron时报错

来源:3-1 创建Electron工程

Jessy_CYJ

2019-08-11 16:38

Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/electron/.electron'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@6.0.1 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@6.0.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/cuiyuejiao/.npm/_logs/2019-08-11T08_35_43_504Z-debug.log



4204 error code ELIFECYCLE
4205 error errno 1
4206 error electron@6.0.1 postinstall: `node install.js`
4206 error Exit status 1
4207 error Failed at the electron@6.0.1 postinstall script.
4207 error This is probably not a problem with npm. There is likely additional logging output above.
4208 verbose exit [ 1, true ]

写回答 关注

2回答

  • 神思者
    2019-08-11 22:15:42

    苹果系统在安装命令前面加上sudo

  • Jessy_CYJ
    2019-08-11 23:03:25

    加上sudo也是这样

N种语言实现4版本告白神器

0基础秒学告白神器,VBS版、前端版、Java版、小程序版,4款神器各取所需

5777 学习 · 202 问题

查看课程

相似问题