Restore @noble/hashes override to fix electron-builder ERR_REQUIRE_ESM regression#19
Merged
Merged
Conversation
Copilot created this pull request from a session on behalf of
NamecoinGithub
July 10, 2026 08:26
View session
NamecoinGithub
marked this pull request as ready for review
July 10, 2026 08:26
There was a problem hiding this comment.
Pull request overview
Restores an npm overrides constraint to force a CommonJS-compatible @noble/hashes version, aiming to prevent electron-builder / app-builder-lib packaging from crashing with ERR_REQUIRE_ESM.
Changes:
- Add
@noble/hashes@1.7.1topackage.jsonoverrides. - Update
package-lock.jsonto include@noble/hashes@1.7.1in the resolved dependency set.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| package.json | Reintroduces an overrides pin for @noble/hashes to avoid ESM-only transitive resolution during packaging. |
| package-lock.json | Updates lockfile resolution to include @noble/hashes@1.7.1 (but still needs correction to fully remove/replace the nested 2.x copy under app-builder-lib). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
electron-builderpackaging (npm run package-linuxand friends) crashes withERR_REQUIRE_ESM. A prior fix for this pinnedelectron-builderto26.13.1and added a@noble/hashesoverride, but a later dependency bump toelectron-builder@26.15.3dropped the override, silently reintroducing the bug.Root cause
app-builder-lib@26.15.3(bundled withelectron-builder) doesrequire("@noble/hashes/blake2.js")inout/targets/blockmap/blockmap.js.@noble/hashes@2.xis ESM-only ("type": "module"), so a static CJSrequire()of it throws at runtime.@noble/hashesto^2.2.0for this transitive dependency.Changes
package.json— add"@noble/hashes": "1.7.1"back tooverrides, forcing the CJS-compatible version for this transitive dependency.package-lock.json— regenerated so@noble/hashesresolves to1.7.1wherever pulled in transitively.electron-builderitself stays on26.15.3(current, exact-pinned) rather than being downgraded — only the broken transitive dependency is constrained: