feat: lazy electron download#49328
Merged
Merged
Conversation
erickzhao
commented
Jan 7, 2026
| const pathFile = path.join(__dirname, 'path.txt'); | ||
|
|
||
| function downloadElectron () { | ||
| console.log('Downloading Electron binary...'); |
Member
Author
There was a problem hiding this comment.
Open to bikeshedding on the exact message or just removing the logging altogether if it feels spammy.
Member
There was a problem hiding this comment.
Maybe we could include a link to the installation docs with this message, similar to how React includes links for errors.
erickzhao
commented
Jan 8, 2026
|
|
||
| ## Running Electron ad-hoc | ||
|
|
||
| If you're in a pinch and would prefer to not use `npm install` in your local |
Member
Author
There was a problem hiding this comment.
Lowkey I think we should remove this npx instruction set from the doc.
jkleinsc
approved these changes
Feb 20, 2026
|
Release Notes Persisted
|
3 tasks
kycutler
pushed a commit
to kycutler/electron
that referenced
this pull request
Feb 26, 2026
* feat: lazy electron download * better error messaging? * add breaking changes script doc * add binary download step to install instructions * respect no binary env var
3 tasks
6 tasks
KristjanESPERANTO
pushed a commit
to MagicMirrorOrg/MagicMirror
that referenced
this pull request
May 6, 2026
additional things: - removed fix chrome-sandbox permissions (runs without) - added `npx install-electron` which downloads the electron binaries new in v42: > Electron now downloads its binary into node_modules dynamically on first launch instead of running a postinstall script. Added the install-electron script to manually trigger the download as well. electron/electron#49328
5 tasks
jandubois
added a commit
to rancher-sandbox/rancher-desktop
that referenced
this pull request
May 13, 2026
Electron 42 dropped its postinstall download (electron/electron#49328). Invoke the new install-electron bin so the Linux chrome-sandbox chmod finds the binary. Signed-off-by: Jan Dubois <jan.dubois@suse.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
First pass at implementing electron/rfcs#22.
This PR spawns a separate Node.js child process running the existing
install.jsscript for the binary download to minimize the diff in the code. Now, there are two ways to get the binary installed:npx electronwill automatically triggerinstall.jsif the Electron binary path is missing.npx install-electronwill manually triggerinstall.js.The error hint now adds the
--noflag to explicitly prevent installation of theinstall-electronpackage (which we've stubbed in the registry just in case).I tested this manually by initializing a new npm project pointing to
file:path/to/src/electron/npmand bypassing the version and checksum checks.cc @MarshallOfSound
Checklist
npm testpassesRelease Notes
Notes: Electron now downloads its binary into
node_modulesdynamically on first launch instead of running apostinstallscript. Added theinstall-electronscript to manually trigger the download as well.