install -g cnpm --registry=https://registry.npmmirror.com cnpm install --save-dev electron
执行如上命令解决问题