Skip to content

Fix @noble/hashes override to a version electron-builder can actually require()#20

Merged
NamecoinGithub merged 1 commit into
Mergingfrom
copilot/fix-linux-debian-build-error
Jul 10, 2026
Merged

Fix @noble/hashes override to a version electron-builder can actually require()#20
NamecoinGithub merged 1 commit into
Mergingfrom
copilot/fix-linux-debian-build-error

Conversation

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown

Restoring the @noble/hashes override to 1.7.1 did not resolve the Linux Debian build failure — electron-builder's app-builder-lib/out/targets/blockmap/blockmap.js still crashed with ERR_REQUIRE_ESM on require("@noble/hashes/blake2.js").

Root cause

  • package-lock.json was hand-edited rather than regenerated, so the override never propagated — a nested app-builder-lib/node_modules/@noble/hashes@2.2.0 (ESM-only) copy remained and was what Node actually resolved.
  • Even with the override applied, 1.7.1 doesn't ship a blake2.js file at all (only blake2b.js/blake2s.js), so it would fail differently (ERR_PACKAGE_PATH_NOT_EXPORTED) rather than fix the build.

Changes

  • package.json: bump the @noble/hashes override from 1.7.1 to 1.8.0 — the last 1.x release with a CJS-requireable blake2.js (exports maps require./blake2.js, import./esm/blake2.js), matching what app-builder-lib@26.15.3 needs.
  • package-lock.json: regenerated via a clean npm install so the override is honored throughout the tree instead of leaving a stale nested copy.

No electron-builder downgrade or new tooling (e.g. patch-package) required.

@NamecoinGithub
NamecoinGithub marked this pull request as ready for review July 10, 2026 09:56
Copilot AI review requested due to automatic review settings July 10, 2026 09:56
@NamecoinGithub
NamecoinGithub merged commit 98307fe into Merging Jul 10, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/hashes override from 1.7.1 to 1.8.0.
  • Regenerate package-lock.json so the override is honored (eliminating the previously nested app-builder-lib copy 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants