惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
T
The Blog of Author Tim Ferriss
J
Java Code Geeks
M
MIT News - Artificial intelligence
F
Fortinet All Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
Microsoft Security Blog
Microsoft Security Blog
N
Netflix TechBlog - Medium
G
Google Developers Blog
L
LangChain Blog
腾讯CDC
大猫的无限游戏
大猫的无限游戏
U
Unit 42
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
罗磊的独立博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
小众软件
小众软件
The GitHub Blog
The GitHub Blog
博客园_首页
GbyAI
GbyAI

博客园 - MvloveYouForever

添加gitignore mac安装小龙虾 flutter重新学习 uniapp简单移动端H5电脑端适配方案 添加ssh后,ssh-rsa fatal: Could not read git合并提交 cordova打印插件备注 H5开发类似rpx实现方法 maven仓库地址 idea与其他软件激活办法 linux常用命令总结 Command line is too long mysql安装教程备份 mybatis-plus 条件参数说明 关于spring unicloud短信不能用 关于mybatis 关于maven vue2 和 vue3的区别 父子组件v-modle,vue2和vue3的区别 Vue3知识点
关于打包electron应用
MvloveYouForever · 2024-09-19 · via 博客园 - MvloveYouForever

----node版本:20.13.1

----npm版本: 10.5.2

1、更换国内源 https://www.cnblogs.com/Mvloveyouforever/p/17884395.html

2、使用npm安装所有依赖

3、npx electron-forge import

4、npm run make 以上如果不行,就要开代理 不知道是否生效 ↓ ↓ ↓

注:要使用npm而非cnpm,不然后续会出问题

设置 electron 镜像源 https://blog.csdn.net/mirkey2code/article/details/131636739

5、打包时下载electron-v6.0.12-darwin-x64,如果网速好大概率会下载失败,导致打包失败,那么我们如何解决呢

手动下载:https://github.com/electron/electron/releases/tag/+你的版本号

Linux系统: $XDG_CACHE_HOME或~/.cache/electron/
MacOS系统: ~/Library/Caches/electron/
Windows系统: $LOCALAPPDATA/electron/Cache或~/AppData/Local/electron/Cache/
下面以macos为例,打开访达 按住快捷键按command + shift + G,粘贴~/Library/Caches/electron/进行前往即可,将下载好的文件复制进去。