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 ]
苹果系统在安装命令前面加上sudo
加上sudo也是这样