openclaw - ✅(Solved) Fix `openclaw status` eagerly loads disabled channel plugins, crashing when bundled plugin deps aren't installed [1 pull requests, 1 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#70338Fetched 2026-04-23 07:26:04
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
cross-referenced ×2closed ×1commented ×1subscribed ×1

openclaw status fails at startup with Cannot find module '@larksuiteoapi/node-sdk' (and then cascades to nostr-tools, etc.) even when those channels are marked disabled in openclaw plugins list. Other commands (openclaw health, openclaw doctor --fix) run cleanly against the same install.

Error Message

[openclaw] Failed to start CLI: Error: Cannot find module '@larksuiteoapi/node-sdk' Require stack:

  • /…/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js

Root Cause

scripts/postinstall-bundled-plugins.mjs intentionally skips installing bundled extension deps:

Bundled extension runtime dependencies are extension-owned. Do not install every bundled extension dependency during core package install unless the legacy eager-install escape hatch is explicitly enabled; openclaw doctor --fix owns the repair path for extensions that are actually used.

So on any stock install, bundled plugins that the user hasn't touched have no node_modules/. That's fine — until status loads them anyway.

Fix Action

Fix / Workaround

Workarounds

  • Set OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS=1 before install/upgrade (forces all deps).
  • Loop npm install --no-save across every dist/extensions/*/ with a package.json.
  • Use openclaw health instead of openclaw status.

PR fix notes

PR #70339: fix(feishu): lazy-load setup client to avoid missing staged runtime deps during onboard

Description (problem / solution / changelog)

Summary

This fixes onboarding failures where Feishu setup paths eagerly loaded @larksuiteoapi/node-sdk before staged runtime dependencies were installed.

The fix makes Feishu client loading lazy in setup/tool-registration code paths, so openclaw onboard can load plugin setup surfaces without requiring Feishu runtime deps up front.

Fixes #70338, #70346, #70343

Root Cause

onboard loads bundled setup entries, which pulled Feishu modules with static imports of ./client.js, which in turn statically imported @larksuiteoapi/node-sdk.
Because this dependency is staged runtime-owned, it may not exist yet at setup-load time.

What Changed

  • Converted setup-path client acquisition to dynamic import / async flow across Feishu tool modules.
  • Updated callers to await async client getters.
  • Kept runtime behavior unchanged once clients are actually used.

Validation

  • pnpm tsgo:prod passed.
  • pnpm openclaw onboard --help now starts successfully without module-load failure.
  • Repro before: Cannot find module '@larksuiteoapi/node-sdk' in onboard setup load path.

Changed files

  • extensions/feishu/src/bitable.ts (modified, +9/-9)
  • extensions/feishu/src/chat.ts (modified, +5/-3)
  • extensions/feishu/src/comment-reaction.ts (modified, +2/-1)
  • extensions/feishu/src/docx.ts (modified, +3/-3)
  • extensions/feishu/src/drive.ts (modified, +1/-1)
  • extensions/feishu/src/perm.ts (modified, +1/-1)
  • extensions/feishu/src/tool-account.ts (modified, +3/-3)
  • extensions/feishu/src/wiki.ts (modified, +1/-1)

Code Example

[openclaw] Failed to start CLI: Error: Cannot find module '@larksuiteoapi/node-sdk'
Require stack:
- //openclaw/dist/extensions/feishu/client-yWGpoGkZ.js

---

loadBundledEntryModuleSync (channel-entry-contract-*.js:148)
loadChannelPlugin (channel-entry-contract-*.js:162)
getBundledChannelPluginForRoot (bundled-*.js:348)
iterateBootstrapChannelPlugins (bootstrap-registry-*.js:72)
deriveSessionChatType (session-chat-type-*.js:34)
hasBackingSession → reconcileTaskRecordForOperatorInspection (task-registry.maintenance-*.js)
getStatusSummary (status.summary-*.js:94)
statusCommand (status-*.js:275)
RAW_BUFFERClick to expand / collapse

Summary

openclaw status fails at startup with Cannot find module '@larksuiteoapi/node-sdk' (and then cascades to nostr-tools, etc.) even when those channels are marked disabled in openclaw plugins list. Other commands (openclaw health, openclaw doctor --fix) run cleanly against the same install.

Environment

  • openclaw --version2026.4.21 (f788c88)
  • Install: npm install -g openclaw/Users/dinesh/.npm-global/lib/node_modules/openclaw
  • macOS 25.3.0, Node from npm-global prefix
  • Enabled channels: Telegram only

Reproduction

  1. npm install -g openclaw (fresh global install, do not set OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS=1)
  2. Configure a single channel (e.g. Telegram)
  3. openclaw status

Expected

Status renders channel health for enabled channels. Disabled bundled plugins are not loaded.

Actual

[openclaw] Failed to start CLI: Error: Cannot find module '@larksuiteoapi/node-sdk'
Require stack:
- /…/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js

After installing that dep manually, status advances and crashes on the next bundled extension (nostr-tools for the nostr plugin), and so on.

Stack (abbreviated)

loadBundledEntryModuleSync (channel-entry-contract-*.js:148)
loadChannelPlugin (channel-entry-contract-*.js:162)
getBundledChannelPluginForRoot (bundled-*.js:348)
iterateBootstrapChannelPlugins (bootstrap-registry-*.js:72)
deriveSessionChatType (session-chat-type-*.js:34)
hasBackingSession → reconcileTaskRecordForOperatorInspection (task-registry.maintenance-*.js)
getStatusSummary (status.summary-*.js:94)
statusCommand (status-*.js:275)

iterateBootstrapChannelPlugins appears to enumerate all bundled channel roots and sync-import each one to derive session chat-type, rather than honoring the disabled-in-config list (or lazy-loading only the channel that owns the session in question).

Why this matters

scripts/postinstall-bundled-plugins.mjs intentionally skips installing bundled extension deps:

Bundled extension runtime dependencies are extension-owned. Do not install every bundled extension dependency during core package install unless the legacy eager-install escape hatch is explicitly enabled; openclaw doctor --fix owns the repair path for extensions that are actually used.

So on any stock install, bundled plugins that the user hasn't touched have no node_modules/. That's fine — until status loads them anyway.

Workarounds

  • Set OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS=1 before install/upgrade (forces all deps).
  • Loop npm install --no-save across every dist/extensions/*/ with a package.json.
  • Use openclaw health instead of openclaw status.

Suggested fix

In deriveSessionChatType / iterateBootstrapChannelPlugins, either (a) filter to channels that are actually referenced by the session being reconciled, or (b) skip bundled plugins whose runtime deps aren't resolvable and emit a warning rather than throwing.

extent analysis

TL;DR

Modify the iterateBootstrapChannelPlugins function to filter or lazy-load bundled channel plugins based on the session being reconciled to prevent loading disabled plugins.

Guidance

  • Review the iterateBootstrapChannelPlugins function to understand how it enumerates bundled channel roots and consider modifying it to honor the disabled-in-config list.
  • Investigate implementing lazy-loading for bundled channel plugins to only load the necessary plugins for the session being reconciled.
  • Consider adding a warning mechanism for bundled plugins with unresolvable runtime dependencies instead of throwing an error.
  • Evaluate the trade-offs between filtering channels and skipping plugins with unresolvable dependencies to determine the best approach.

Example

// Pseudocode example of filtering channels in iterateBootstrapChannelPlugins
function iterateBootstrapChannelPlugins(session) {
  const enabledChannels = getEnabledChannels();
  const bundledChannelPlugins = getBundledChannelPlugins();
  const relevantPlugins = bundledChannelPlugins.filter(plugin => enabledChannels.includes(plugin.channel));
  // Load and process the relevant plugins
}

Notes

The suggested fix requires modifying the deriveSessionChatType and iterateBootstrapChannelPlugins functions, which may have implications for the overall architecture and functionality of the openclaw system.

Recommendation

Apply workaround by setting OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS=1 before install/upgrade, as this forces the installation of all bundled extension dependencies, providing a temporary solution until the root cause is addressed.

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 `openclaw status` eagerly loads disabled channel plugins, crashing when bundled plugin deps aren't installed [1 pull requests, 1 comments, 2 participants]