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..95e4665 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 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