当前位置:网站首页>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
边栏推荐
- pytorch yolov5 训练自定义数据
- Generate XML schema from class
- Access the database and use redis as the cache of MySQL (a combination of redis and MySQL)
- 多线程(一) 进程与线程
- Tkinter window preload
- JVM第三话 -- JVM性能调优实战和高频面试题记录
- Memory management chapter of Kobayashi coding
- Image classification, just look at me!
- Cmake tutorial Step4 (installation and testing)
- Privacy computing helps secure data circulation and sharing
猜你喜欢
ISPRS2022/云检测:Cloud detection with boundary nets基于边界网的云检测
Huaxia Fund: sharing of practical achievements of digital transformation in the fund industry
隐私计算助力数据的安全流通与共享
南京大学:新时代数字化人才培养方案探讨
星环科技数据安全管理平台 Defensor重磅发布
Nanjing University: Discussion on the training program of digital talents in the new era
ISPRS2020/云检测:Transferring deep learning models for cloud detection between Landsat-8 and Proba-V
职场进阶指南:大厂人必看书籍推荐
Zabbix
华夏基金:基金行业数字化转型实践成果分享
随机推荐
LeetCode笔记:Weekly Contest 300
最大人工岛[如何让一个连通分量的所有节点都记录总节点数?+给连通分量编号]
Eliminate the writing of 'if () else{}'
Xiaobai getting started with NAS - quick building private cloud tutorial series (I) [easy to understand]
How to improve the thermal management in PCB design with the effective placement of thermal through holes?
Le cours d'apprentissage de la machine 2022 de l'équipe Wunda arrive.
小白入门NAS—快速搭建私有云教程系列(一)[通俗易懂]
Leetcode daily question: the first unique character in the string
Login and connect CDB and PDB
【在優麒麟上使用Electron開發桌面應】
About Statistical Power(统计功效)
Find the first k small element select_ k
图像分类,看我就够啦!
热通孔的有效放置如何改善PCB设计中的热管理?
ConvMAE(2022-05)
Career advancement Guide: recommended books for people in big factories
FCN: Fully Convolutional Networks for Semantic Segmentation
Check namespaces and classes
爱因斯坦求和einsum
【在优麒麟上使用Electron开发桌面应】