Fix @noble/hashes override to a version electron-builder can actually require()#20
Merged
Merged
Conversation
Copilot created this pull request from a session on behalf of
NamecoinGithub
July 10, 2026 09:49
View session
NamecoinGithub
marked this pull request as ready for review
July 10, 2026 09:56
There was a problem hiding this comment.
Pull request overview
This pull request updates dependency overrides to ensure electron-builder (via app-builder-lib) can require() a CommonJS-compatible @noble/hashes entrypoint during Linux Debian builds, and regenerates the lockfile so the override is applied consistently throughout the dependency tree.
Changes:
- Bump
@noble/hashesoverride from1.7.1to1.8.0. - Regenerate
package-lock.jsonso the override is honored (eliminating the previously nestedapp-builder-libcopy that could bypass the override).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| package.json | Updates the npm overrides pin for @noble/hashes to 1.8.0 to match electron-builder’s CJS require() needs. |
| package-lock.json | Regenerated lockfile reflecting the new override and removing the stale nested @noble/hashes resolution 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.
Restoring the
@noble/hashesoverride to1.7.1did not resolve the Linux Debian build failure —electron-builder'sapp-builder-lib/out/targets/blockmap/blockmap.jsstill crashed withERR_REQUIRE_ESMonrequire("@noble/hashes/blake2.js").Root cause
package-lock.jsonwas hand-edited rather than regenerated, so the override never propagated — a nestedapp-builder-lib/node_modules/@noble/hashes@2.2.0(ESM-only) copy remained and was what Node actually resolved.1.7.1doesn't ship ablake2.jsfile at all (onlyblake2b.js/blake2s.js), so it would fail differently (ERR_PACKAGE_PATH_NOT_EXPORTED) rather than fix the build.Changes
package.json: bump the@noble/hashesoverride from1.7.1to1.8.0— the last 1.x release with a CJS-requireableblake2.js(exportsmapsrequire→./blake2.js,import→./esm/blake2.js), matching whatapp-builder-lib@26.15.3needs.package-lock.json: regenerated via a cleannpm installso the override is honored throughout the tree instead of leaving a stale nested copy.No
electron-builderdowngrade or new tooling (e.g.patch-package) required.