openclaw - ✅(Solved) Fix Bundled nostr setup surface fails in Onboard: missing nostr-tools [1 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#72182Fetched 2026-04-27 05:33:46
View on GitHub
Comments
2
Participants
2
Timeline
4
Reactions
0
Timeline (top)
commented ×2closed ×1cross-referenced ×1

Opening Onboard / model switching can fail because the bundled Nostr setup surface imports nostr-tools, but that dependency is not installed in the main OpenClaw package.

Error Message

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'nostr-tools' imported from /home/jiangs/.npm-global/lib/node_modules/openclaw/dist/extensions/nostr/setup-surface-GW7xrEvH.js

Root Cause

Summary

Opening Onboard / model switching can fail because the bundled Nostr setup surface imports nostr-tools, but that dependency is not installed in the main OpenClaw package.

Fix Action

Fix / Workaround

Local workaround

Running the following fixed it locally:

cd ~/.npm-global/lib/node_modules/openclaw
npm install nostr-tools@^2.23.3

PR fix notes

PR #72216: fix(nostr): keep setup status off full surface

Description (problem / solution / changelog)

## Summary Problem: Opening Onboard / model switching can scan bundled setup surfaces. The Nostr setup-only plugin was using the delegated setup wizard proxy for status resolution, so a status check imported the full setup-surface.js. That full surface imports nostr-key-utils, which imports nostr-tools, so packaged installs without optional Nostr runtime deps could fail even when Nostr was not configured.

What changed:

  • Keep Nostr setup status resolution on the lightweight channel.setup.ts surface.
  • Preserve the existing lightweight setup adapter and account/status behavior.
  • Add a regression test that mocks the full setup-surface.js to throw, then verifies setup status still resolves without loading it.

Closes #72182

Change Type

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope

  • Integrations
  • UI / DX
  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • API / contracts
  • CI/CD / infra

Root Cause / Regression History

The setup-only Nostr entry point already avoids static nostr-tools imports, but createDelegatedSetupWizardProxy delegates status.resolveConfigured and status detail resolvers to the full wizard. Status/discovery paths can call those resolvers before the user enables Nostr, which pulls in the full setup surface and its Nostr runtime dependency graph.

This keeps the cold setup/status path on the local lightweight resolver instead of delegating to the full wizard for status-only work.

Regression Test Plan

Coverage level that should have caught this:

  • Unit test
  • Seam / integration test
  • End-to-end test
  • Existing coverage already sufficient

Target test file: extensions/nostr/src/channel.setup.test.ts

Scenario locked in: Nostr setup status resolves when the full setup-surface.js would fail to load. The test mocks ./setup-surface.js to throw, then asserts unconfigured/configured setup status still works from channel.setup.ts.

User-visible / Behavior Changes

Onboard and setup status scans should no longer fail on missing nostr-tools when Nostr is unconfigured. Configuring or running the Nostr channel is unchanged.

Security Impact

New permissions/capabilities? No Secrets/tokens handling changed? No New/changed network calls? No Command/tool execution surface changed? No Data access scope changed? No

Repro + Verification

Repro before fix:

  1. Use a packaged install where bundled Nostr runtime deps have not been installed.
  2. Open Onboard / model switching so setup surfaces are scanned.
  3. Nostr status discovery can import the full setup surface and fail with missing nostr-tools.

Verification run locally:

  • OPENCLAW_VITEST_INCLUDE_FILE=<temp json for extensions/nostr/**/*.test.ts> node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-messaging.config.ts — 13 files / 271 tests passed.
  • pnpm exec oxfmt --check --threads=1 CHANGELOG.md extensions/nostr/src/channel.setup.ts extensions/nostr/src/channel.setup.test.ts
  • pnpm exec oxlint --tsconfig tsconfig.oxlint.extensions.json extensions/nostr/src/channel.setup.ts extensions/nostr/src/channel.setup.test.ts
  • git diff --check

Compatibility / Migration

Backward compatible? Yes Config/env changes? No Migration needed? No

Failure Recovery

Revert this commit. The change is scoped to Nostr setup-only status discovery and does not modify Nostr runtime send/receive behavior.

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/nostr/src/channel.setup.test.ts (added, +43/-0)
  • extensions/nostr/src/channel.setup.ts (modified, +20/-24)

Code Example

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'nostr-tools' imported from /home/jiangs/.npm-global/lib/node_modules/openclaw/dist/extensions/nostr/setup-surface-GW7xrEvH.js

---

cd ~/.npm-global/lib/node_modules/openclaw
npm install nostr-tools@^2.23.3
RAW_BUFFERClick to expand / collapse

Summary

Opening Onboard / model switching can fail because the bundled Nostr setup surface imports nostr-tools, but that dependency is not installed in the main OpenClaw package.

Environment

  • OpenClaw: 2026.4.24
  • Install path: global npm install
  • Host OS: Linux

Error

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'nostr-tools' imported from /home/jiangs/.npm-global/lib/node_modules/openclaw/dist/extensions/nostr/setup-surface-GW7xrEvH.js

Repro

  1. Install/update OpenClaw to 2026.4.24
  2. Open Onboard / model switching flow
  3. During channel/plugin setup surface loading, OpenClaw loads the bundled nostr setup surface
  4. It throws because nostr-tools is missing

Notes

  • nostr was not enabled in config (plugins.entries.nostr = null, channels.nostr = null)
  • This appears to happen because Onboard scans setup surfaces even for channels that are not enabled
  • The bundled Nostr files are present under dist/extensions/nostr/
  • dist/extensions/nostr/package.json declares:
    • "dependencies": { "nostr-tools": "^2.23.3" }
  • But npm ls nostr-tools --depth=2 under the installed openclaw package returned empty

Local workaround

Running the following fixed it locally:

cd ~/.npm-global/lib/node_modules/openclaw
npm install nostr-tools@^2.23.3

After that, both of these imports succeeded:

  • import('nostr-tools')
  • importing dist/extensions/nostr/setup-surface-GW7xrEvH.js

Expected

Either:

  1. nostr-tools should be installed with the bundled Nostr extension, or
  2. Onboard/setup-surface discovery should not hard-fail when an optional bundled channel dependency is absent

Suspected cause

A packaging/runtime-deps gap for the bundled nostr extension in 2026.4.24.

extent analysis

TL;DR

Install nostr-tools as a dependency in the OpenClaw package to resolve the ERR_MODULE_NOT_FOUND error.

Guidance

  • Verify that nostr-tools is not installed by running npm ls nostr-tools --depth=2 under the installed openclaw package.
  • Install nostr-tools using the command npm install nostr-tools@^2.23.3 in the OpenClaw package directory.
  • Check if the issue is resolved by retrying the Onboard/model switching flow.
  • Consider updating the OpenClaw packaging to include nostr-tools as a dependency for the bundled Nostr extension.

Example

No code snippet is necessary for this issue, as it is related to dependency installation.

Notes

This solution assumes that the issue is caused by a packaging/runtime-deps gap for the bundled nostr extension in 2026.4.24. If the issue persists after installing nostr-tools, further investigation may be needed.

Recommendation

Apply workaround: Install nostr-tools as a dependency in the OpenClaw package, as it is a simple and effective solution to resolve the ERR_MODULE_NOT_FOUND error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix Bundled nostr setup surface fails in Onboard: missing nostr-tools [1 pull requests, 2 comments, 2 participants]