From ac8984c82bdd4f28d93915b0bcbb060cb087da7c Mon Sep 17 00:00:00 2001 From: chenming Date: Wed, 25 Feb 2026 11:18:40 +0800 Subject: [PATCH] docs: add missing electron build step before electron:dev The `electron:dev` script requires `dist-electron/main.js` to exist, but the README does not mention running `node scripts/build-electron.mjs` beforehand. Without this step, `electron .` fails with: "Cannot find module '/path/to/dist-electron/main.js'" Add the build command to both the Quick Start and Development sections in all three README files (EN, CN, JA). --- README.md | 4 ++++ README_CN.md | 4 ++++ README_JA.md | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/README.md b/README.md index f8e7aed..f688031 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ npm install npm run dev # -- or start the full Electron app in dev mode -- +node scripts/build-electron.mjs # compile Electron main process (first time only) npm run electron:dev ``` @@ -197,6 +198,9 @@ codepilot/ # Run Next.js dev server only (opens in browser) npm run dev +# Compile the Electron main process (required before first run) +node scripts/build-electron.mjs + # Run the full Electron app in dev mode # (starts Next.js + waits for it, then opens Electron) npm run electron:dev diff --git a/README_CN.md b/README_CN.md index 9c5800a..f2ff22e 100644 --- a/README_CN.md +++ b/README_CN.md @@ -64,6 +64,7 @@ npm install npm run dev # -- 或者启动完整的 Electron 桌面应用 -- +node scripts/build-electron.mjs # 编译 Electron 主进程(首次运行前需要) npm run electron:dev ``` @@ -197,6 +198,9 @@ codepilot/ # 仅运行 Next.js 开发服务器(在浏览器中打开) npm run dev +# 编译 Electron 主进程(首次运行前需要执行) +node scripts/build-electron.mjs + # 运行完整的 Electron 桌面应用(开发模式) # (先启动 Next.js,等待就绪后打开 Electron) npm run electron:dev diff --git a/README_JA.md b/README_JA.md index be9fb65..bf50ab3 100644 --- a/README_JA.md +++ b/README_JA.md @@ -73,6 +73,7 @@ npm install npm run dev # -- または、開発モードで完全な Electron アプリを起動 -- +node scripts/build-electron.mjs # Electron メインプロセスをコンパイル(初回のみ必要) npm run electron:dev ``` @@ -192,6 +193,9 @@ codepilot/ # Next.js 開発サーバーのみを実行(ブラウザで開く) npm run dev +# Electron メインプロセスをコンパイル(初回実行前に必要) +node scripts/build-electron.mjs + # 開発モードで完全な Electron アプリを実行 # (Next.js を起動して待機し、その後 Electron を開く) npm run electron:dev