Skip to content

fix(electron): bump electron to v42 so the binary installs on Node.js 26 - #1137

Open
ondrhn wants to merge 1 commit into
vuejs:mainfrom
ondrhn:chore/electron-node26
Open

ondrhn wants to merge 1 commit into
vuejs:mainfrom
ondrhn:chore/electron-node26

Conversation

@ondrhn

@ondrhn ondrhn commented Sep 14, 2026

Copy link
Copy Markdown

On Node.js 26 the electron@36 postinstall exits without extracting the archive, so node_modules/electron/dist ends up with a stray .pak file and no executable or path.txt. The cause is extract-zip@2, which Electron replaced with @electron-internal/extract-zip starting in v40. Lines 40 and 41 are already EOL, so this goes to ^42.11.3, the oldest supported release with the fix.

Two things worth knowing about the jump from 36:

  • Electron 42 no longer downloads the binary in postinstall; require('electron') fetches it on first use, which is what src/cli.ts already does through import electron from 'electron'.
  • The electron package now requires Node >= 22.12 while the root engines field still says >= 18.19 (Node 18 and 20 are both EOL). I left engines alone; adding one to packages/electron is your call.

None of the APIs used in packages/electron (app, BrowserWindow, webPreferences, setMenu, loadURL) are touched by the 37-42 breaking-change notes. The lockfile diff is mostly @types/node 24.7.2 -> 24.13.4, pulled in by electron's ^24.9.0 range and then deduped across the workspace.

Verified with Node v26.8.2: fresh npm install electron@36.9.4 reproduces the empty dist/; with 42.11.3, npx electron --version prints v42.11.3. pnpm install --frozen-lockfile and pnpm build:electron pass on the same Node.

closes #1136

electron@36 pulls in extract-zip@2, which silently fails on Node 26 and
leaves node_modules/electron/dist without the executable or path.txt.
Electron switched to @electron-internal/extract-zip in v40; v42 is the
oldest line still supported. Note that 42 drops the postinstall download,
so the binary is fetched on first require('electron') instead.

closes vuejs#1136
@netlify

netlify Bot commented Sep 14, 2026

Copy link
Copy Markdown

Deploy Preview for vue-devtools-docs canceled.

Name Link
🔨 Latest commit 99b7cf7
🔍 Latest deploy log https://app.netlify.com/projects/vue-devtools-docs/deploys/6aa81f98284ef00008be3c07

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.

Upgrade Electron to fix ZIP extraction on Node.js 26

1 participant