解决electron安装,卡在install.js不动的问题,UnhandledPromiseRejectionWarning: RequestError: read ECONNRESET
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相关推荐
- 【Eletron】解决electron安装,卡在install.js不动的问题,UnhandledPromiseRejectionWarning: RequestError: read ECONNRE
最近想写个带GUI的客户端程序,无奈Cpp和Qt从毕业就没碰过,所以就从eletron下手了.但是运行例子的时候遇到错误. 参照 https://blog.csdn.net/qq_27005821/a ...
- 解决WEEX/phantomjs-prebuilt安装太慢 weex安装卡在phantomjs-prebuilt不动的问题
解决WEEX/phantomjs-prebuilt安装太慢 weex安装卡在phantomjs-prebuilt不动 的问题 问题描述 问题诊断 解决方案 加速原理和其他说明 如果方案没用的话 问题描 ...
- 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 ...
- chromedriver@2.41.0 install: `node install.js`安装失败解决;npm安装报错
错误 chromedriver@2.41.0 install: `node install.js` 解决 在项目目录下: npm install chromedriver --chromedriver ...
- 安装Ubuntu时发现卡在一个地方点不动解决方法
有很多小伙伴发现自己在VMware安装虚拟机时,卡在一个页面不能点击,拖动也不起作用,一直卡在一个地方动不了,真的气死人了,总以为是电脑或者其他什么地方的问题,移除然后重新安装,这样来来回回重新尝试了 ...
- electron-v8.2.1-win32-x64.zip 下载失败(npm install electron 安装失败)
npm 安装 electron 依赖时下载失败(或下载缓慢)的解决方案 electron-v8.2.1-win32-x64.zip 下载失败 淘宝npm镜像:https://npm.taobao.or ...
- 【Electron】解决 npm安装出现 self-signed certificate in certificate
问题 按照Electron 官网步骤安装时 npm install electron --save-dev出现报错 error RequestError: self-signed certificat ...
- Windows10更新22H2安装卡在61%的解决办法
Windows10更新22H2安装卡在61%的解决办法 Windows10经常收到构建和修补程序,但与此同时,用户在尝试安装它们时会遇到一些奇怪的问题.有时,该过程以错误代码结束,但是在此,更新被卡在 ...
- 解决无法安装cnpm,cnpm卡顿问题
解决无法安装cnpm,cnpm卡顿问题 参考文章: (1)解决无法安装cnpm,cnpm卡顿问题 (2)https://www.cnblogs.com/lvyueyang/p/9253630.html ...
最新文章
- tensorflow基于csv数据集实现多元线性回归并预测
- MariaDB 宣布成立基金会
- 数据仓库专题18-数据建模语言IDEF(转载)
- Graphic Device
- 节点name在graph中无法展示_图节点分类与消息传递
- 一文理解接口和抽象类
- 使用Confluence如何输出一份结构清晰 可读性高的测试文档?
- C# 代码创建mysql存储过程(使用mysqlScript)
- 员工端电脑重装系统或者更换电脑处理方法
- PDF文件切成图片然后拼接成长图
- Unity导入图片为何会失真
- js获取今天剩余时间_骚姿势获取无线路由器后台权限
- 世界顶级的程序员们都在读哪些书?
- 如何结束python程序_python程序结束
- php array pluck,laravel辅助函数-数组
- 局部连接层(Locally-Connected Layer)
- JAVA面试八股文宝典(黑马学习随笔)-- 基础篇
- Vant-area数据
- html页面打印成a4的尺寸,我如何将我的html div调整为A4打印页面中的整页?
- 自律是什么?就是对自己狠一点,再狠一点,然后你人生的层次就……