当前位置:网站首页>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_re
main.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
边栏推荐
- 使用QT遍历Json文档及搜索子对象
- JDBC reads a large amount of data, resulting in memory overflow
- Le cours d'apprentissage de la machine 2022 de l'équipe Wunda arrive.
- 写作写作写作写作
- JVM third talk -- JVM performance tuning practice and high-frequency interview question record
- Action avant ou après l'enregistrement du message teamcenter
- Configure pytorch environment in Anaconda - win10 system (small white packet meeting)
- Find the first k small element select_ k
- EasyCVR接入设备开启音频后,视频无法正常播放是什么原因?
- jdbc读大量数据导致内存溢出
猜你喜欢
RSE2020/云检测:基于弱监督深度学习的高分辨率遥感图像精确云检测
Sophon KG升级3.1:打破数据间壁垒,解放企业生产力
Cmake tutorial Step4 (installation and testing)
Daily exercise: a series of dates
Find the first k small element select_ k
"Xiaodeng in operation and maintenance" is a single sign on solution for cloud applications
GFS distributed file system
Huaxia Fund: sharing of practical achievements of digital transformation in the fund industry
Sophon kg upgrade 3.1: break down barriers between data and liberate enterprise productivity
Redis Foundation
随机推荐
吴恩达团队2022机器学习课程,来啦
破解湖+仓混合架构顽疾,星环科技推出自主可控云原生湖仓一体平台
node_exporter内存使用率不显示
[utiliser Electron pour développer le Bureau sur youkirin devrait]
图扑软件数字孪生 | 基于 BIM 技术的可视化管理系统
OpenShift常用管理命令杂记
Matlab built-in function how different colors, matlab subsection function different colors drawing
nacos -分布式事务-Seata** linux安装jdk ,mysql5.7启动nacos配置ideal 调用接口配合 (保姆级细节教程)
钉钉开放平台小程序API的缓存接口都有哪些内容?
mybash
星环科技重磅推出数据要素流通平台Transwarp Navier,助力企业实现隐私保护下的数据安全流通与协作
职场进阶指南:大厂人必看书籍推荐
小林coding的内存管理章节
瀚升优品app翰林优商系统开发功能介绍
【PaddlePaddle】 PaddleDetection 人脸识别 自定义数据集
FCN: Fully Convolutional Networks for Semantic Segmentation
ITK Example
Star ring technology data security management platform defender heavy release
Career advancement Guide: recommended books for people in big factories
第十一届中国云计算标准和应用大会 | 华云数据成为全国信标委云计算标准工作组云迁移专题组副组长单位副组长单位