openclaw - ✅(Solved) Fix [Bug]: Problem: - <root>: read failed: Error: Cannot find module '@larksuiteoapi/node-sdk'\nRequire stack: [1 pull requests, 6 comments, 7 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#70008Fetched 2026-04-23 07:30:25
View on GitHub
Comments
6
Participants
7
Timeline
12
Reactions
6
Author
Timeline (top)
commented ×6labeled ×2subscribed ×2closed ×1

#openclaw update

Config invalid File: ~/.openclaw/openclaw.json Problem:

  • <root>: read failed: Error: Cannot find module '@larksuiteoapi/node-sdk'\nRequire stack:\n- /usr/lib/node_modules/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js

Run: openclaw doctor --fix

Error Message

  • <root>: read failed: Error: Cannot find module '@larksuiteoapi/node-sdk'\nRequire stack:\n- /usr/lib/node_modules/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js
  • <root>: read failed: Error: Cannot find module '@larksuiteoapi/node-sdk'\nRequire stack:\n- /usr/lib/node_modules/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js

Root Cause

#openclaw update

Config invalid File: ~/.openclaw/openclaw.json Problem:

  • <root>: read failed: Error: Cannot find module '@larksuiteoapi/node-sdk'\nRequire stack:\n- /usr/lib/node_modules/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js

Run: openclaw doctor --fix

Fix Action

Fixed

PR fix notes

PR #70138: fix(plugins): eagerly install bundled runtime deps

Description (problem / solution / changelog)

Summary

  • Problem: packaged installs could ship bundled channel/plugin entrypoints without their runtime dependencies installed, so bootstrap paths failed with Cannot find module ... before openclaw doctor --fix could help.
  • Why it matters: fresh installs and updates could look successful while openclaw status, onboarding, or bundled channel entry loading immediately crashed.
  • What changed: packaged postinstall now eagerly installs bundled plugin runtime dependencies by default, and packaged installs fail fast if that nested install fails.
  • What did NOT change (scope boundary): source checkouts still skip eager bundled-runtime installation, and this PR does not change the config-recovery half of #70096.

Change Type (select all)

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

Scope (select all touched areas)

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

Linked Issue/PR

  • Closes #70008
  • Closes #70093
  • Closes #70099
  • Related #70096
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: packaged installs excluded dist/extensions/*/node_modules/**, and normal postinstall runs skipped bundled runtime dependency installation unless an eager-install env var was set.
  • Missing detection / guardrail: user installs did not fail when the nested install path failed, so packaged installs could silently continue with missing bundled runtime deps.
  • Contributing context (if known): release-check already forces eager install under a dedicated env flag, which masked the mismatch between release validation and normal end-user installs.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file:
    • test/scripts/postinstall-bundled-plugins.test.ts
    • src/plugins/stage-bundled-plugin-runtime-deps.test.ts
  • Scenario the test should lock in:
    • packaged installs eagerly install bundled runtime deps by default
    • packaged installs fail fast when that install step fails
    • explicit opt-out via OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS=0 still works
  • Why this is the smallest reliable guardrail:
    • these tests exercise the actual postinstall decision boundary without needing a full publish/release lane.
  • Existing test that already covers this (if any):
    • the packed install smoke and bundled channel entry smoke cover the installed layout verification path.
  • If no new test is added, why not:
    • N/A

User-visible / Behavior Changes

  • Fresh packaged installs and updates now install bundled plugin runtime deps by default.
  • If that nested install fails, the packaged install now fails immediately with a clear postinstall error instead of warning and continuing into a broken runtime state.

Diagram (if applicable)

Before:
install package -> skip bundled runtime dep install by default -> bootstrap loads bundled entry -> Cannot find module

After:
install package -> install bundled runtime deps -> bundled entry loads successfully
               \-> install fails -> postinstall throws immediately

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (Yes)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation:
    • Packaged install already runs postinstall. This change makes the bundled runtime dependency install path the default packaged-install behavior, using the existing npm runner and failing fast on errors instead of silently continuing.

Repro + Verification

Environment

  • OS: macOS host verifying packaged tarball install
  • Runtime/container: Node/npm packaged install smoke
  • Model/provider: N/A
  • Integration/channel (if any): bundled channel entry smoke (Feishu, Slack, Nostr, WhatsApp, Telegram, bundled diffs)
  • Relevant config (redacted): none

Steps

  1. pnpm test test/scripts/postinstall-bundled-plugins.test.ts src/plugins/stage-bundled-plugin-runtime-deps.test.ts
  2. npm pack --ignore-scripts then npm install the tarball into a temp prefix
  3. Verify bundled runtime dep sentinels exist and run node scripts/test-built-bundled-channel-entry-smoke.mjs --package-root <installed package root>

Expected

  • packaged installs eagerly install bundled runtime deps
  • packaged installs fail on nested bundled-runtime install failure
  • bundled channel entry smoke passes from the installed layout

Actual

  • targeted tests pass
  • real packed-install smoke passes
  • bundled channel entry smoke passes from the installed package root

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
    • pnpm test test/scripts/postinstall-bundled-plugins.test.ts src/plugins/stage-bundled-plugin-runtime-deps.test.ts
    • packed tarball install now materializes bundled runtime dep sentinels for Feishu/Slack/Nostr/WhatsApp/Telegram/diffs deps
    • OPENCLAW_DISABLE_BUNDLED_ENTRY_SOURCE_FALLBACK=1 node scripts/test-built-bundled-channel-entry-smoke.mjs --package-root <installed package root> passes
  • Edge cases checked:
    • explicit opt-out via OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS=0
    • packaged install failure path now throws with context instead of warning and continuing
  • What you did not verify:
    • full pnpm check:changed is still blocked on unrelated existing tsgo:core:test failures in src/agents/pi-embedded-runner/*

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (Yes)
  • Migration needed? (No)
  • If yes, exact upgrade steps:
    • OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS=0|false|off now explicitly disables the default eager packaged-install behavior.

Risks and Mitigations

  • Risk: offline/air-gapped installs that cannot reach the registry now fail during packaged postinstall instead of appearing successful.
    • Mitigation: this is intentional fail-fast behavior because bundled entrypoints are expected to work immediately after install; silent success left users in a broken runtime state.

Changed files

  • scripts/postinstall-bundled-plugins.mjs (modified, +103/-52)
  • src/plugins/stage-bundled-plugin-runtime-deps.test.ts (modified, +130/-0)
  • test/scripts/postinstall-bundled-plugins.test.ts (modified, +86/-3)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

#openclaw update

Config invalid File: ~/.openclaw/openclaw.json Problem:

  • <root>: read failed: Error: Cannot find module '@larksuiteoapi/node-sdk'\nRequire stack:\n- /usr/lib/node_modules/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js

Run: openclaw doctor --fix

Steps to reproduce

1、update openclaw by cmd: openclaw update

2、update stop by below problem: Config invalid File: ~/.openclaw/openclaw.json Problem:

  • <root>: read failed: Error: Cannot find module '@larksuiteoapi/node-sdk'\nRequire stack:\n- /usr/lib/node_modules/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js

Run: openclaw doctor --fix

Expected behavior

openclaw update

Actual behavior

openclaw update

OpenClaw version

2026.4.21

Operating system

Ubuntu 24.04

Install method

No response

Model

minimax

Provider / routing chain

openclaw

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

Run openclaw doctor --fix to potentially resolve the module not found error.

Guidance

  • The error message indicates that the @larksuiteoapi/node-sdk module is missing, which is required by the openclaw extension.
  • Verify that the @larksuiteoapi/node-sdk module is installed by checking the node_modules directory.
  • Try running openclaw doctor --fix as suggested in the error message to attempt to resolve the issue.
  • If the issue persists, check the openclaw.json file for any configuration errors or missing dependencies.

Example

No code snippet is provided as the issue is related to a missing module rather than a code error.

Notes

The openclaw doctor --fix command may not resolve the issue if the missing module is not compatible with the current version of openclaw or if there are other configuration errors.

Recommendation

Apply workaround: Run openclaw doctor --fix to attempt to resolve the module not found error, as it is a straightforward and low-risk solution.

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…

FAQ

Expected behavior

openclaw update

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 [Bug]: Problem: - <root>: read failed: Error: Cannot find module '@larksuiteoapi/node-sdk'\nRequire stack: [1 pull requests, 6 comments, 7 participants]