当前位置:网站首页>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
边栏推荐
- [PM2 details]
- Isprs2022 / Cloud Detection: Cloud Detection with Boundary nets Boundary Networks Based Cloud Detection
- Le cours d'apprentissage de la machine 2022 de l'équipe Wunda arrive.
- "Xiaodeng in operation and maintenance" is a single sign on solution for cloud applications
- rsync
- Electron安装问题
- Fix vulnerability - mysql, ES
- Huaxia Fund: sharing of practical achievements of digital transformation in the fund industry
- 吴恩达团队2022机器学习课程,来啦
- How to solve the error "press any to exit" when deploying multiple easycvr on one server?
猜你喜欢

Leetcode daily practice: rotating arrays

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

让更多港澳青年了解南沙特色文创产品!“南沙麒麟”正式亮相

Leetcode daily question: the first unique character in the string

Le cours d'apprentissage de la machine 2022 de l'équipe Wunda arrive.

Tencent music launched its new product "quyimai", which provides music commercial copyright authorization

南京大学:新时代数字化人才培养方案探讨

Redis Foundation

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

Fix vulnerability - mysql, ES
随机推荐
How can cluster deployment solve the needs of massive video access and large concurrency?
[performance test] full link voltage test
吳恩達團隊2022機器學習課程,來啦
Cmake tutorial step1 (basic starting point)
图扑软件数字孪生 | 基于 BIM 技术的可视化管理系统
About Statistical Power(统计功效)
在一台服务器上部署多个EasyCVR出现报错“Press any to exit”,如何解决?
[TestLink] testlink1.9.18 solutions to common problems
[paddlepaddle] paddedetection face recognition custom data set
How awesome is the architecture of "12306"?
模拟百囚徒问题
What are the changes in the 2022 PMP Exam?
Sophon CE Community Edition is online, and free get is a lightweight, easy-to-use, efficient and intelligent data analysis tool
Record a case of using WinDbg to analyze memory "leakage"
爱因斯坦求和einsum
Introduction to VC programming on "suggestions collection"
怎么选择外盘期货平台最正规安全?
文章中的逻辑词
使用QT遍历Json文档及搜索子对象
从XML架构生成类