From 21310e600b9693553aea2d15c207a04ce5c8b7a1 Mon Sep 17 00:00:00 2001 From: Local Dev Date: Wed, 21 Oct 2026 20:51:28 +0300 Subject: [PATCH] theseus: ship nostr-tools alongside hermes.mjs in packaged builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0.3.99 installed users hit "Cannot find package 'nostr-tools' imported from resources/lib/hermes.mjs" the first time they tried the Create account / Open existing account button on the Hermes panel. The module was extracted to resources/lib/ via extraResources (so the same .mjs/.js pattern as the other lib files), but every other extracted .mjs happens to only pull node:* builtins — hermes.mjs is the first one that needs real npm deps. Node's resolver walks up from resources/lib/hermes.mjs looking for a node_modules sibling and finds nothing: node_modules lives inside app.asar, unreachable from an extracted file. Fix: extraResources the nostr-tools dir + its three dep namespaces + the one WASM dep so the walk finds them. --- package.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/package.json b/package.json index 13bfc4bf..26ef4e98 100644 --- a/package.json +++ b/package.json @@ -157,6 +157,22 @@ "from": "lib/hermes.js", "to": "lib/hermes.mjs" }, + { + "from": "node_modules/nostr-tools", + "to": "node_modules/nostr-tools" + }, + { + "from": "node_modules/@noble", + "to": "node_modules/@noble" + }, + { + "from": "node_modules/@scure", + "to": "node_modules/@scure" + }, + { + "from": "node_modules/nostr-wasm", + "to": "node_modules/nostr-wasm" + }, { "from": "snapshots/bns-name-snapshot.json", "to": "bns-name-snapshot.json"