From b4b1289d27732b672632cb33810367a00c49a6e2 Mon Sep 17 00:00:00 2001 From: Craun718 <3653544699@qq.com> Date: Sat, 22 Aug 2026 02:30:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs(getting-start):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=20Electron=20=E9=95=9C=E5=83=8F=E5=AE=89=E8=A3=85=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- developer/getting-start.md | 10 ++++++++++ en/developer/getting-start.md | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/developer/getting-start.md b/developer/getting-start.md index b0a2c0a..31e6510 100644 --- a/developer/getting-start.md +++ b/developer/getting-start.md @@ -81,6 +81,14 @@ cd frontend yarn install ``` +如果 Electron 二进制下载缓慢或失败,可以使用 npmmirror 镜像执行一次性安装: + +```bash +yarn cross-env ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" yarn install +``` + +该命令只为本次 `yarn install` 设置下载源,不会修改全局配置。 + ### 4. 启动软件 @@ -225,6 +233,8 @@ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser 1. 清理缓存: `yarn cache clean` 2. 删除 `node_modules` 和 `yarn.lock` 3. 重新安装: `yarn install` +4. Electron 二进制下载缓慢或失败时,使用镜像执行一次性安装: + `yarn cross-env ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" yarn install` ### Q: 后端启动失败提示权限不足 diff --git a/en/developer/getting-start.md b/en/developer/getting-start.md index 3d64a2a..f7850bb 100644 --- a/en/developer/getting-start.md +++ b/en/developer/getting-start.md @@ -80,6 +80,14 @@ cd frontend yarn install ``` +If the Electron binary download is slow or fails, use the npmmirror for a one-shot install: + +```bash +yarn cross-env ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" yarn install +``` + +This command sets the download source only for this `yarn install` run and does not change global configuration. + ### 4. Start the App ::: tip Administrator Privileges @@ -221,6 +229,8 @@ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser 1. Clear cache: `yarn cache clean` 2. Delete `node_modules` and `yarn.lock` 3. Install again: `yarn install` +4. If the Electron binary download is slow or fails, install once through the mirror: + `yarn cross-env ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" yarn install` ### Q: Backend startup fails due to insufficient permissions From 381fc78a28332c2ad1ef43fe7b7090d88df58c72 Mon Sep 17 00:00:00 2001 From: Craun718 <3653544699@qq.com> Date: Sat, 22 Aug 2026 02:40:16 +0800 Subject: [PATCH 2/2] Update en/developer/getting-start.md Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --- en/developer/getting-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/developer/getting-start.md b/en/developer/getting-start.md index f7850bb..95e4665 100644 --- a/en/developer/getting-start.md +++ b/en/developer/getting-start.md @@ -80,7 +80,7 @@ cd frontend yarn install ``` -If the Electron binary download is slow or fails, use the npmmirror for a one-shot install: +If the Electron binary download is slow or fails, use npmmirror for a one-shot install: ```bash yarn cross-env ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" yarn install