Repository navigation
Fix Electron startup failure caused by the Host lockfile - #1125
Merged
FlorianRappl merged 1 commit intoNov 5, 2026
Merged
Conversation
The merge of ElectronNET#1118 left package-lock.json with queue 6.0.2 but without its dependency inherits. The build copies this lockfile next to the generated package.json, which requests image-size ^1.2.1, so npm reuses the locked queue, never installs inherits, and Electron fails at startup with "Cannot find module 'inherits'". Go back to image-size ^1.2.1 in the Host: it matches package.template.json and the callback API that main.js uses, which 2.x no longer provides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
The only failure is |
Contributor
Author
|
Thanks for merging! The tests are green on |
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.
Problem
On
develop, Electron crashes at startup in the integration tests, on every runner:ElectronFixturethen times out with "The Electron process did not start within 10 seconds", so every test that uses Electron fails. Thedeveloppush run for05aa92e(run 40534971218) shows this, and so does #1124.Cause
Two files decide what ends up in
.electron/, and they disagree:build/package.template.jsongeneratespackage.jsonand requestsimage-size ^1.2.1.src/ElectronNET.Host/package-lock.jsonis copied next to it by the*.jsonglob inElectronSourceFiles. Since Bump image-size from 1.2.1 to 2.0.3 in /src/ElectronNET.Host #1112/Bump image-size from 1.2.1 to 2.0.3 in /src/ElectronNET.Host #1113 it pinsimage-size 2.0.3.That mismatch was harmless at first: the lockfile had neither
queuenorinherits, so npm resolved both fresh forimage-size 1.2.1, and CI stayed green.The merge of
developinto the electron bump branch (6751468, merged by #1118) then broughtqueue 6.0.2back withoutinherits. npm reuses the lockedqueueand doesn't add its missing dependency, soinheritsis never installed.Fix
image-sizeback to^1.2.1insrc/ElectronNET.Host/package.json. This matches the template andmain.js, which callsimageSize(file, callback). In 2.x,imageSizetakes a buffer and reading from a file moved toimageSizeFromFileinimage-size/fromFile.package-lock.json. This restoresimage-size 1.2.1andinherits 2.0.4, and drops two orphaned dev entries (quick-lru,resolve-alpn). No other package versions change.Moving to image-size 2.x would also work, but it needs
main.jsand the template changed together, plus a splash screen check, so I kept this PR to the repair.Testing
Locally on Linux with Electron 38.2.2:
.electroninstall with npm 10.9.9 and the currentdeveloplockfile reproduces the CI failure:inheritsis missing andrequire('image-size')throws the same error.inheritsand the integration suite passes: 102 passed, 18 skipped, 0 failed.I haven't run this on Windows or macOS; the CI matrix on this PR covers those.
Some earlier runs had unrelated failures in one or two tests (
DevTools_check, and timeouts inDomReady_event_firesandExecuteJavaScript_returns_title), so a single red test here may be that flakiness rather than this issue.🤖 Generated with Claude Code