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