当前位置:网站首页>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
边栏推荐
- Use of print function in MATLAB
- Career advancement Guide: recommended books for people in big factories
- U-Net: Convolutional Networks for Biomedical Images Segmentation
- What is the reason why the video cannot be played normally after the easycvr access device turns on the audio?
- Leetcode daily question: merge two ordered arrays
- 集群部署如何解决海量视频接入与大并发需求?
- Image classification, just look at me!
- Isprs2022 / Cloud Detection: Cloud Detection with Boundary nets Boundary Networks Based Cloud Detection
- JVM第三话 -- JVM性能调优实战和高频面试题记录
- jdbc读大量数据导致内存溢出
猜你喜欢

Sophon kg upgrade 3.1: break down barriers between data and liberate enterprise productivity
![Maximum artificial island [how to make all nodes of a connected component record the total number of nodes? + number the connected component]](/img/8b/a60fc36115580f018445e4c2a28a9d.png)
Maximum artificial island [how to make all nodes of a connected component record the total number of nodes? + number the connected component]

图像分类,看我就够啦!

Can communication of nano

To solve the stubborn problem of Lake + warehouse hybrid architecture, xinghuan Technology launched an independent and controllable cloud native Lake warehouse integrated platform

nano的CAN通信

Mask wearing detection based on yolov3

About Statistical Power(统计功效)

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

ISPRS2022/雲檢測:Cloud detection with boundary nets基於邊界網的雲檢測
随机推荐
【在優麒麟上使用Electron開發桌面應】
吳恩達團隊2022機器學習課程,來啦
Introduction to VC programming on "suggestions collection"
JDBC reads a large amount of data, resulting in memory overflow
写作写作写作写作
星环科技数据安全管理平台 Defensor重磅发布
Cmake tutorial step1 (basic starting point)
《力扣刷题计划》复制带随机指针的链表
第十一届中国云计算标准和应用大会 | 云计算国家标准及白皮书系列发布 华云数据全面参与编制
热通孔的有效放置如何改善PCB设计中的热管理?
Numerical calculation method chapter8 Numerical solutions of ordinary differential equations
Leetcode exercise - 206 Reverse linked list
钉钉开放平台小程序API的缓存接口都有哪些内容?
Leetcode notes: Weekly contest 300
nano的CAN通信
Sophon CE社区版上线,免费Get轻量易用、高效智能的数据分析工具
Login and connect CDB and PDB
Record a case of using WinDbg to analyze memory "leakage"
ConvMAE(2022-05)
Access the database and use redis as the cache of MySQL (a combination of redis and MySQL)