Description
After a fresh clone—or when bun/npm install runs without lifecycle scripts for electron—desktop predev can run while the OS-specific Electron binary was never downloaded. The electron package normally writes node_modules/electron/path.txt only after install.js / postinstall succeeds. When that file is missing, later steps fail in ways that look unrelated to Electron.
Expected: Either document that installs must allow scripts, or have predev run the same step proactively.
Proposal: Before copy-icons, build-node, etc., if packages/desktop/node_modules/electron/path.txt is absent (after resolving the real electron package directory), spawn node install.js with cwd set to that directory and exit non-zero if it fails.
Plugins
None — desktop package / contributor dev setup.
OpenCode version
Local workspace on dev branch (not tied to a single released app version).
Steps to reproduce
- Clone the repo or reinstall deps such that
electron postinstall did not run (e.g. scripts disabled, or incomplete install).
- Confirm
path.txt is missing under the resolved electron install path (Bun may symlink under node_modules/.bun/...).
- Run
bun run dev:desktop from the repo root or bun run predev in packages/desktop.
- Observe downstream failures (e.g. electron-vite / missing binary) instead of a clear electron install error.
Screenshot and/or share link
N/A — environment-specific; no /share link.
Operating System
Linux (any OS when the Electron binary was not downloaded).
Terminal
N/A
Description
After a fresh clone—or when
bun/npminstall runs without lifecycle scripts forelectron—desktoppredevcan run while the OS-specific Electron binary was never downloaded. Theelectronpackage normally writesnode_modules/electron/path.txtonly afterinstall.js/ postinstall succeeds. When that file is missing, later steps fail in ways that look unrelated to Electron.Expected: Either document that installs must allow scripts, or have
predevrun the same step proactively.Proposal: Before
copy-icons,build-node, etc., ifpackages/desktop/node_modules/electron/path.txtis absent (after resolving the realelectronpackage directory), spawnnode install.jswithcwdset to that directory and exit non-zero if it fails.Plugins
None — desktop package / contributor dev setup.
OpenCode version
Local workspace on
devbranch (not tied to a single released app version).Steps to reproduce
electronpostinstall did not run (e.g. scripts disabled, or incomplete install).path.txtis missing under the resolvedelectroninstall path (Bun may symlink undernode_modules/.bun/...).bun run dev:desktopfrom the repo root orbun run predevinpackages/desktop.Screenshot and/or share link
N/A — environment-specific; no
/sharelink.Operating System
Linux (any OS when the Electron binary was not downloaded).
Terminal
N/A