Skip to content

fix(frontend): require node 20 for electron dev#413

Open
anirudh5harma wants to merge 1 commit into
aoagents:mainfrom
anirudh5harma:codex/fix-frontend-node20-guardrails
Open

fix(frontend): require node 20 for electron dev#413
anirudh5harma wants to merge 1 commit into
aoagents:mainfrom
anirudh5harma:codex/fix-frontend-node20-guardrails

Conversation

@anirudh5harma

@anirudh5harma anirudh5harma commented Jun 25, 2026

Copy link
Copy Markdown

Closes #412

Problem

The Electron frontend is effectively Node-20-only today, but contributors are
not told that up front. On Node 24/26, upstream Electron/Electron Forge install
failures can leave node_modules/electron half-installed, and the break only
surfaces later when npm run dev fails with Electron failed to install correctly.

Our desktop/frontend workflows already run on Node 20, so this is local-dev
friction caused by missing guardrails rather than an app-specific code path.

Change

  • add engines.node = 20.x to frontend/package.json
  • add a preinstall check that fails fast on unsupported Node versions with
    clear remediation steps
  • add frontend/.nvmrc
  • document the Node 20 requirement and the reason for it in the root README

Test

cd frontend
export NVM_DIR="$HOME/.nvm"
. "$NVM_DIR/nvm.sh"

nvm use 20
npm test

Result:

30 passed (30)
303 passed (303)

Unsupported-node guard:

node frontend/scripts/check-node-version.mjs

Verified:

  • Node 26 fails immediately with the new explanatory message
  • Node 20 passes the guard
  • a fresh install on Node 26 now fails before a partial Electron install can
    corrupt node_modules

Notes

npm run typecheck still reports the pre-existing forge.config.ts typing
error around osxNotarize; this change does not modify that area.

@anirudh5harma anirudh5harma force-pushed the codex/fix-frontend-node20-guardrails branch from 69109d8 to 7c7c985 Compare June 25, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend install on Node 24/26 can leave Electron half-installed and break npm run dev

1 participant