当前位置:网站首页>Electron installation problems
Electron installation problems
2022-07-05 18:08:00 【Han Mo Mingshang】
Project input : npm config edit
stay registry Add... Below , And replaced registry
registry=https://registry.npm.taobao.org/
disturl=https://npm.taobao.org/mirrors/node
electron_mirror=https://cdn.npm.taobao.org/dist/electron/
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/install electron Failure postinstall: `node install.js`
npm config set electron_mirror "https://npm.taobao.org/mirrors/electron/"Electron Preloading :
newly build preload.js stay src below
preload.js:
var electron_re=require('electron')
window.electron=electron_remain.js:
const {
BrowserWindow,
} = require('electron')
new BrowserWindow({
width: 1100,
height: 720,
minWidth: 1100,
minHeight: 720,
webPreferences: {
nodeIntegration: true,
preload: path.join(__dirname, '/preload.js'),
nativeWindowOpen: true,
contextIsolation: false,// need false
webSecurity: false
},
icon: `${__static}/icon/favicon.ico`
})
win.loadURL('app://./index.html')vue.config.js:
module.exports = {
pluginOptions:{
electronBuilder:{
preload:'src/preload.js',
target: "electron-renderer"
}
}
}Possible problems in packaging
* 1. Download when packaging electron-v.xxxx.zip File failed
* terms of settlement : Download the files of the corresponding version and packaging platform directly from the file library of Taobao , After downloading, put it in C:\Users\Administrator\AppData\Local\electron\Cache Under this catalog
* 2. Download when packaging winCodeSign-v.xxx.7z File failed
* Download address :https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.5.0/winCodeSign-2.5.0.7z
* After downloading, unzip it and put it C:\Users\Administrator\AppData\Local\electron-builder\Cache\winCodeSign Under the table of contents
* 3. Download when packaging nsis-v.xxx.7z File failed
* Download address :https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.3.2/nsis-3.0.3.2.7z
* After downloading, unzip it and put it C:\Users\Administrator\AppData\Local\electron-builder\Cache\nsis
* 4. Download when packaging nsis-resources-v.xxx.7z File failed
* Download address :https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z
* After downloading, unzip it and put it C:\Users\Administrator\AppData\Local\electron-builder\Cache\nsis\nsis-resources-3.4.1
边栏推荐
- 寻找第k小元素 前k小元素 select_k
- 华夏基金:基金行业数字化转型实践成果分享
- What are the requirements for PMP certification? How much is it?
- "Xiaodeng in operation and maintenance" is a single sign on solution for cloud applications
- [PM2 details]
- Tkinter window preload
- EasyCVR平台通过接口编辑通道出现报错“ID不能为空”,是什么原因?
- 图像分类,看我就够啦!
- Star Ring Technology launched transwarp Navier, a data element circulation platform, to help enterprises achieve secure data circulation and collaboration under privacy protection
- Failed to virtualize table with JMeter
猜你喜欢

记一次使用Windbg分析内存“泄漏”的案例

图扑软件数字孪生 | 基于 BIM 技术的可视化管理系统

pytorch yolov5 训练自定义数据

buuctf-pwn write-ups (9)

第十一届中国云计算标准和应用大会 | 华云数据成为全国信标委云计算标准工作组云迁移专题组副组长单位副组长单位

Sophon base 3.1 launched mlops function to provide wings for the operation of enterprise AI capabilities

彻底理解为什么网络 I/O 会被阻塞?

分享:中兴 远航 30 pro root 解锁BL magisk ZTE 7532N 8040N 9041N 刷机 刷面具原厂刷机包 root方法下载

Career advancement Guide: recommended books for people in big factories

nano的CAN通信
随机推荐
EasyCVR接入设备开启音频后,视频无法正常播放是什么原因?
About Statistical Power(统计功效)
消除`if()else{ }`写法
[paddleclas] common commands
钉钉开放平台小程序API的缓存接口都有哪些内容?
Mask wearing detection based on yolov3
职场进阶指南:大厂人必看书籍推荐
Electron安装问题
JVM第三话 -- JVM性能调优实战和高频面试题记录
Leetcode daily question: the first unique character in the string
英语句式参考
删除数组中的某几个元素
EasyCVR平台通过接口编辑通道出现报错“ID不能为空”,是什么原因?
[BeanShell] there are many ways to write data locally
Sophon base 3.1 launched mlops function to provide wings for the operation of enterprise AI capabilities
GFS distributed file system
吴恩达团队2022机器学习课程,来啦
集群部署如何解决海量视频接入与大并发需求?
《力扣刷题计划》复制带随机指针的链表
Sophon KG升级3.1:打破数据间壁垒,解放企业生产力