openclaw - ✅(Solved) Fix Packaging defect: missing declared dependency for Feishu bundle (@larksuiteoapi/node-sdk) [1 pull requests, 3 comments, 4 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#70093Fetched 2026-04-23 07:29:24
View on GitHub
Comments
3
Participants
4
Timeline
7
Reactions
0
Timeline (top)
commented ×3cross-referenced ×2closed ×1subscribed ×1

openclaw 2026.4.20 hard-imports @larksuiteoapi/node-sdk from the Feishu dist bundle, but the top-level package manifest does not declare that dependency.

On a clean global install, openclaw status --deep can fail until the module is installed manually:

Error: Cannot find package '@larksuiteoapi/node-sdk'

Error Message

Error: Cannot find package '@larksuiteoapi/node-sdk'

Root Cause

openclaw 2026.4.20 hard-imports @larksuiteoapi/node-sdk from the Feishu dist bundle, but the top-level package manifest does not declare that dependency.

On a clean global install, openclaw status --deep can fail until the module is installed manually:

Error: Cannot find package '@larksuiteoapi/node-sdk'

Fix Action

Workaround

Manual install unblocks it:

npm i -g @larksuiteoapi/node-sdk

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)

Code Example

Error: Cannot find package '@larksuiteoapi/node-sdk'

---

node -e "const p=require('/usr/local/lib/node_modules/openclaw/package.json'); console.log(JSON.stringify({version:p.version,dep:p.dependencies?.['@larksuiteoapi/node-sdk']||null,opt:p.optionalDependencies?.['@larksuiteoapi/node-sdk']||null},null,2))"

---

{
  "version": "2026.4.20",
  "dep": null,
  "opt": null
}

---

/usr/local/lib/node_modules/openclaw/dist/extensions/feishu/monitor-CHPxutCS.js:20:import * as Lark from "@larksuiteoapi/node-sdk";
/usr/local/lib/node_modules/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js:3:import * as Lark from "@larksuiteoapi/node-sdk";

---

/usr/local/lib/node_modules/openclaw/dist/extensions/feishu/package.json:7:    "@larksuiteoapi/node-sdk": "^1.60.0",

---

npm i -g @larksuiteoapi/node-sdk
RAW_BUFFERClick to expand / collapse

Summary

openclaw 2026.4.20 hard-imports @larksuiteoapi/node-sdk from the Feishu dist bundle, but the top-level package manifest does not declare that dependency.

On a clean global install, openclaw status --deep can fail until the module is installed manually:

Error: Cannot find package '@larksuiteoapi/node-sdk'

Evidence

Top-level manifest does not declare the dependency:

node -e "const p=require('/usr/local/lib/node_modules/openclaw/package.json'); console.log(JSON.stringify({version:p.version,dep:p.dependencies?.['@larksuiteoapi/node-sdk']||null,opt:p.optionalDependencies?.['@larksuiteoapi/node-sdk']||null},null,2))"

Output on 2026.4.20:

{
  "version": "2026.4.20",
  "dep": null,
  "opt": null
}

But the built Feishu bundle imports it directly:

/usr/local/lib/node_modules/openclaw/dist/extensions/feishu/monitor-CHPxutCS.js:20:import * as Lark from "@larksuiteoapi/node-sdk";
/usr/local/lib/node_modules/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js:3:import * as Lark from "@larksuiteoapi/node-sdk";

There is also a nested dist manifest containing the dependency:

/usr/local/lib/node_modules/openclaw/dist/extensions/feishu/package.json:7:    "@larksuiteoapi/node-sdk": "^1.60.0",

Repro

  1. Install [email protected] on a clean machine/global prefix.
  2. Run openclaw status --deep.
  3. Observe failure when the Feishu bundle path is loaded and @larksuiteoapi/node-sdk is absent.

Workaround

Manual install unblocks it:

npm i -g @larksuiteoapi/node-sdk

Expected

Either:

  • declare @larksuiteoapi/node-sdk in the main package manifest so global installs pull it in, or
  • ensure Feishu code is lazy/optional and does not hard-import the dependency on hosts that do not use Feishu.

Impact

This affects clean installs/upgrades/rollbacks of 2026.4.20+ and creates a false baseline-failure blocker unrelated to the user's configured channels.

extent analysis

TL;DR

The most likely fix is to declare @larksuiteoapi/node-sdk in the main package manifest of openclaw to ensure it is installed alongside openclaw.

Guidance

  • Verify the issue by checking the package.json file of openclaw for the missing dependency declaration.
  • To mitigate the issue, manually install @larksuiteoapi/node-sdk using npm i -g @larksuiteoapi/node-sdk as a temporary workaround.
  • Consider making the Feishu code lazy or optional to avoid hard-importing the dependency on hosts that do not use Feishu.
  • Review the nested dist manifest in feishu/package.json to ensure it is correctly declaring the dependency.

Example

No code snippet is provided as the issue is related to package dependency declaration.

Notes

This issue affects clean installs, upgrades, and rollbacks of openclaw version 2026.4.20 and later, causing a false baseline failure blocker.

Recommendation

Apply the workaround by manually installing @larksuiteoapi/node-sdk until the dependency is declared in the main package manifest of openclaw, as this ensures the required package is installed and available for use.

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 Packaging defect: missing declared dependency for Feishu bundle (@larksuiteoapi/node-sdk) [1 pull requests, 3 comments, 4 participants]