shell:
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ npm install --registry=https://registry.npmmirror.com -g electron
如仍然无法运行,cd
到node_modules/electron/
,执行
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ node install.js
Windows cmd:
set ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
npm install --registry=https://registry.npmmirror.com -g electron
如仍然无法运行,cd
到node_modules/electron/
,执行
set ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
node install.js