Pin extract-zip to a yauzl that can read the Electron archive - #151
Open
Ikromjon1998 wants to merge 1 commit into
Open
Pin extract-zip to a yauzl that can read the Electron archive#151Ikromjon1998 wants to merge 1 commit into
Ikromjon1998 wants to merge 1 commit into
Conversation
extract-zip resolves its own nested yauzl 2.10.0, which stalls partway through inflating a large deflated entry: it stops emitting data and never fires end, error or close. Electron's postinstall unzips the runtime with it, so the extraction stops after the first entry and leaves node_modules/electron/dist holding LICENSES.chromium.html and nothing else. install.js still exits 0 and npm reports success, so the first sign of trouble is the app failing on a missing Electron.app/Contents/Info.plist. The top-level yauzl dependency is already ^3.3.2, but that does not reach extract-zip, which pins its own copy through ^2.10.0 and which Node resolves in preference. Overriding it scopes the fix to the one place still on the broken release. Verified with npm ci under a parent .npmrc containing ignore-scripts=true, matching the Laravel 12 skeleton: before yauzl 2.10.0 1 file in dist no binary after yauzl 3.4.0 261 files in dist Electron runs, v40.10.2 Both installs exit 0, which is why this is easy to miss. The archive itself is not at fault: unzip -t reports all 585 entries intact on the same cached download.
simonhamp
approved these changes
Sep 5, 2026
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.
The separate PR you asked for in #150. This is the second half of #145: with
.npmrcmerged, Electron's postinstall now runs — but on a clean install the runtime still does not land.What happens
extract-zipresolves its own nested yauzl 2.10.0, which stalls partway through inflating a large deflated entry: it stops emitting data and never firesend,errororclose. Electron's postinstall unzips the runtime with it, so extraction stops after the first entry and leaves:install.jsstill exits 0 and npm reports success, so nothing surfaces the problem until the app fails on a missingElectron.app/Contents/Info.plist— an error that names the wrong culprit.The archive is not at fault:
unzip -treports all 585 entries intact on the same cached download.Why the existing dependency doesn't cover it
resources/electron/package.jsonalready requiresyauzl: ^3.3.2, but that does not reachextract-zip, which pins its own copy through^2.10.0— and Node resolves a nested copy in preference to the hoisted one. The override scopes the fix to the single place still on the broken release, leaving the top-level dependency untouched.Verified
npm ciinresources/electron, under a parent.npmrccontainingignore-scripts=trueto match the Laravel 12 skeleton. Same command both times; only the override differs:distElectron --version→v40.10.2Both installs exit 0, which is why this is easy to miss.
On the lockfile
Regenerated with
npm install --package-lock-only. The diff is limited to the yauzl entry and the two transitive packages it no longer needs (buffer-crc32,fd-slicer) — nothing else re-resolved.