Forge fails to package on Node.js 24.16 and 26
Pre-flight checklist
- [x] I have read the contribution documentation for this project.
- [x] I agree to follow the code of conduct that this project uses.
- [x] I have searched the issue tracker for a bug that matches the one I want to file, without success.
Forge version
7.11.2
Electron version
42.3.0
Operating system
Kubuntu 24.04
Last known working Forge version
No response
Expected behavior
package success and out folder not empty
Actual behavior
forever package and out folder empty
Steps to reproduce
- clone https://github.com/long76/build_bug
- install nodejs
24.16.0 npm installnpm run dist
Additional information
on 24.15.0 all ok
See https://github.com/electron/electron/issues/51619, extract-zip > yauzl@2 is broken on Node 24.16. Setting a manual resolution/override for [email protected] via your package manager will fix it.
In the meantime, we're planning on replacing extract-zip with a new internal lib to avoid this issue going forward.
Thank you for the report!
See electron/electron#51619,
extract-zip > yauzl@2is broken on Node 24.16. Setting a manual resolution/override for[email protected]via your package manager will fix it.In the meantime, we're planning on replacing
extract-zipwith a new internal lib to avoid this issue going forward.Thank you for the report!
i see, thanks!
been using this at work for a few weeks. handles edge cases that caught us off guard with other tools. really well thought out.
Anyone else running into this issue, this is a extract-zip issue where you'll notice it only extracts the first file in the electron zip.
electron themselves are moving to a drop in replacement called electron-internal/extract-zip
Electron discussion and fix: https://github.com/electron/electron/issues/51963#issuecomment-4687717433
Electron packager themselves has also updated, and should be fixed with the current version https://github.com/electron/packager/pull/1917#issuecomment-4626940591
This should be fixed once electron packager is updated internally for forge. For people currently experiencing this problem, resolve or override the package resolution
For my pnpm setup, I simply redirected extract-zip to the electron internal version that already comes with the rest of the electron ecosystem
// pnpm-workspace.yaml
overrides:
extract-zip: npm:@electron-internal/[email protected]
Hope this helps someone!
For anyone using yarn as their package manager, the fix is to add
"resolutions": {
"extract-zip": "npm:@electron-internal/[email protected]"
}
to your package.json
@erickzhao fix will be in forge 8?
Thanks for the comment @long76, we had fixed it and I queued up a release but it didn't publish before I went on PTO. It's out now: https://github.com/electron/forge/releases/tag/v8.0.0-alpha.10
Thanks for the comment @long76, we had fixed it and I queued up a release but it didn't publish before I went on PTO. It's out now: https://github.com/electron/forge/releases/tag/v8.0.0-alpha.10
Thanks!
re-run Steps to reproduce on NodeJS 24.18.0, seems all works
see: https://github.com/nodejs/node/issues/63487#issuecomment-4798713628
Yep, thanks for the update @long76. The Node team intentionally reverted the change to avoid breaking users, iirc?
The Node team intentionally reverted the change to avoid breaking users, iirc?
seems like that, but replace yauzl@2 needed for support newer versions nodejs
I'm experiencing the same issue on Node.js v26.7.0, but it works fine on v25.9.0.
The same on Windows. Tried node v26.9.0 to package my project, no luck. Switched back to node v24.21.0 and all things work again.
I'm prepping the first Forge v8 stable release for this week. Stay tuned!
8.0.1 was released, all works for me. feel free to reopen
8.0.1was released, all works for me. feel free to reopen
on node v26.13.0 works too
"devDependencies": {
"@electron-forge/cli": "^8.0.1"
}