Mac安装Electron错误

npm install electron@1.7.6 -g
/usr/local/bin/electron -> /usr/local/lib/node_modules/electron/cli.js

> electron@1.7.6 postinstall /usr/local/lib/node_modules/electron
> node install.js

/usr/local/lib/node_modules/electron/install.js:48
  throw err
  ^

Error: read ECONNRESET
    at _errnoException (util.js:1026:11)
    at TLSWrap.onread (net.js:606:25)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@1.7.6 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron@1.7.6 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

解决方法:

sudo npm install -g electron --unsafe-perm=true --allow-root
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。