1.选择项目文件夹
2.npm init
3.npm install electron --save-dev
4.npm --registry=https://registry.npm.taobao.org install
5.node install.js的时候ctrl+c取消,y确定
6.cd ./node_modules/electron
7.下载https://cdn.npm.taobao.org/dist/electron/7.0.0/electron-v7.0.0-win32-x64.zip并复制到上面的文件夹,重命名为electron.zip
此为64位win版本,如果是其他版本请进入https://cdn.npm.taobao.org/dist/electron/7.0.0页面选择下载
8.修改 ./node_modules/electron/install.js,如下:

#!/usr/bin/env nodeconst version = require('./package').versionconst fs = require('fs')
const os = require('os')
const path = require('path')
const extract = require('extract-zip')
const platformPath = 'electron.exe'
const zipPath = "./electron.zip"
extractFile (zipPath)
// unzips and makes path.txt point at the correct executable
function extractFile (zipPath) {extract(zipPath, { dir: path.join(__dirname, 'dist') }, function (err) {if (err) return onerror(err)fs.writeFile(path.join(__dirname, 'path.txt'), platformPath, function (err) {if (err) return onerror(err)})})
}

9../node_modules/electron目录下运行,node install.js
10.返回项目目录,安装完成,如果为github下的demo,可以在此运行npm start测试.

解决electron安装,卡在install.js不动的问题,UnhandledPromiseRejectionWarning: RequestError: read ECONNRESET相关推荐

  1. 【Eletron】解决electron安装,卡在install.js不动的问题,UnhandledPromiseRejectionWarning: RequestError: read ECONNRE

    最近想写个带GUI的客户端程序,无奈Cpp和Qt从毕业就没碰过,所以就从eletron下手了.但是运行例子的时候遇到错误. 参照 https://blog.csdn.net/qq_27005821/a ...

  2. 解决WEEX/phantomjs-prebuilt安装太慢 weex安装卡在phantomjs-prebuilt不动的问题

    解决WEEX/phantomjs-prebuilt安装太慢 weex安装卡在phantomjs-prebuilt不动 的问题 问题描述 问题诊断 解决方案 加速原理和其他说明 如果方案没用的话 问题描 ...

  3. electron 使用npm install安装 报错 electron@12.2.2 postinstall: node install.js

    electron 使用npm install安装 报错 electron@12.2.2 postinstall: node install.js 在github 下载了一个electron项目,在np ...

  4. chromedriver@2.41.0 install: `node install.js`安装失败解决;npm安装报错

    错误 chromedriver@2.41.0 install: `node install.js` 解决 在项目目录下: npm install chromedriver --chromedriver ...

  5. 安装Ubuntu时发现卡在一个地方点不动解决方法

    有很多小伙伴发现自己在VMware安装虚拟机时,卡在一个页面不能点击,拖动也不起作用,一直卡在一个地方动不了,真的气死人了,总以为是电脑或者其他什么地方的问题,移除然后重新安装,这样来来回回重新尝试了 ...

  6. electron-v8.2.1-win32-x64.zip 下载失败(npm install electron 安装失败)

    npm 安装 electron 依赖时下载失败(或下载缓慢)的解决方案 electron-v8.2.1-win32-x64.zip 下载失败 淘宝npm镜像:https://npm.taobao.or ...

  7. 【Electron】解决 npm安装出现 self-signed certificate in certificate

    问题 按照Electron 官网步骤安装时 npm install electron --save-dev出现报错 error RequestError: self-signed certificat ...

  8. Windows10更新22H2安装卡在61%的解决办法

    Windows10更新22H2安装卡在61%的解决办法 Windows10经常收到构建和修补程序,但与此同时,用户在尝试安装它们时会遇到一些奇怪的问题.有时,该过程以错误代码结束,但是在此,更新被卡在 ...

  9. 解决无法安装cnpm,cnpm卡顿问题

    解决无法安装cnpm,cnpm卡顿问题 参考文章: (1)解决无法安装cnpm,cnpm卡顿问题 (2)https://www.cnblogs.com/lvyueyang/p/9253630.html ...

最新文章

  1. tensorflow基于csv数据集实现多元线性回归并预测
  2. MariaDB 宣布成立基金会
  3. 数据仓库专题18-数据建模语言IDEF(转载)
  4. Graphic Device
  5. 节点name在graph中无法展示_图节点分类与消息传递
  6. 一文理解接口和抽象类
  7. 使用Confluence如何输出一份结构清晰 可读性高的测试文档?
  8. C# 代码创建mysql存储过程(使用mysqlScript)
  9. 员工端电脑重装系统或者更换电脑处理方法
  10. PDF文件切成图片然后拼接成长图
  11. Unity导入图片为何会失真
  12. js获取今天剩余时间_骚姿势获取无线路由器后台权限
  13. 世界顶级的程序员们都在读哪些书?
  14. 如何结束python程序_python程序结束
  15. php array pluck,laravel辅助函数-数组
  16. 局部连接层(Locally-Connected Layer)
  17. JAVA面试八股文宝典(黑马学习随笔)-- 基础篇
  18. Vant-area数据
  19. html页面打印成a4的尺寸,我如何将我的html div调整为A4打印页面中的整页?
  20. 自律是什么?就是对自己狠一点,再狠一点,然后你人生的层次就……

热门文章

  1. 什么是软件project?
  2. P-value个人理解
  3. office2010怎么卸载干净
  4. java电影推荐系统_GitHub - Lee0509/mirs: 电影智能推荐系统JAVA实现
  5. 字体分享Lucida Sans Typewriter
  6. rtx3070ti显卡参数 rtx3070ti怎么样
  7. 南京青奥会志愿者标识物揭晓 4条志愿彩最抢眼
  8. python医学图像分割_医学图像分割如何入门?
  9. 微型计算机原理和单片机,8086微机原理与51单片机对比
  10. Java源码-弹球小游戏(Pin Ball)