Environment
- openclaw
2026.4.21 (commit f788c88), installed via brew install openclaw (/opt/homebrew/lib/node_modules/openclaw)
@openclaw/feishu 2026.4.20 (bundled, dist/extensions/feishu/)
- node
v25.6.1
- macOS
26.2 (Darwin 25.2.0)
Summary
A vanilla install of openclaw leaves the bundled feishu plugin with an unresolvable require('@larksuiteoapi/node-sdk'). Two upstream code paths still load the extension before honoring the enabled flag — the gateway request handler and the config-reload pipeline — so the error fires recurrently even when the user has never configured Feishu. Both openclaw plugins disable feishu and openclaw plugins uninstall feishu fail to fix it: disable itself crashes with the same MODULE_NOT_FOUND (its plugin-resolution path eagerly loads the api chain before writing the disable flag), and uninstall refuses because feishu is origin: bundled. The only working remediation is hand-editing openclaw.json to add plugins.entries.feishu = { enabled: false }.
Reproduction
- Fresh install on a host that has never configured Feishu:
brew install openclaw (or npm i -g openclaw).
- Trigger any config reload (e.g. edit
~/.openclaw/openclaw.json, run openclaw doctor, or restart the gateway). gateway.err.log:
[reload] config restart failed: Error: Cannot find module '@larksuiteoapi/node-sdk'
- /opt/homebrew/lib/node_modules/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js
- Wait for an external WebSocket client to query channel capabilities (observed daily ~03:00–04:00 ET in production).
gateway.err.log:
[gateway] request handler failed: Error: Cannot find module '@larksuiteoapi/node-sdk'
- /opt/homebrew/lib/node_modules/openclaw/dist/extensions/feishu/client-yWGpoGkZ.js: code=MODULE_NOT_FOUND
- Try the documented fix:
openclaw plugins disable feishu. Crashes with the same MODULE_NOT_FOUND — the disable command's plugin-resolution path loads feishu/api.js → drive → client → @larksuiteoapi/node-sdk before writing the disable flag.
- Try removing it:
openclaw plugins uninstall feishu. Refuses with Plugin 'feishu' is not managed by plugins config/install records and cannot be uninstalled because feishu is origin: bundled (not separately installed).
Observed behavior
- Recurring
MODULE_NOT_FOUND in two production paths: the config-reload watcher (every openclaw.json rewrite/hot-reload) and the gateway request handler (any external capability probe). 7 occurrences in the local gateway.err.log over a 13-day window (the path only fires when triggered, not continuously, but every trigger fails).
- The
plugins disable CLI crashes with the same error it is meant to silence. The CLI is structurally unable to fix this bug.
- The
plugins uninstall CLI rejects bundled plugins by design.
- Workaround that works: hand-edit
~/.openclaw/openclaw.json and add plugins.entries.feishu = { enabled: false }. The config-reload watcher checks plugins.entries.<id>.enabled BEFORE requiring the extension api, so this disables cleanly. Verified via openclaw daemon restart + 30s tail of gateway.err.log: zero subsequent larksuiteoapi/feishu/MODULE_NOT_FOUND occurrences. openclaw plugins inspect feishu status changed from Error: bundled (disabled by default) to Error: disabled in config.
Expected behavior
A bundled plugin the user has never configured should not be able to crash the config-reload pipeline or the gateway request handler. openclaw plugins disable <id> should never fail with the same error it is meant to silence.
Evidence
dist/extensions/feishu/package.json declares the SDK as a runtime dep:
{
"name": "@openclaw/feishu",
"version": "2026.4.20",
"dependencies": {
"@larksuiteoapi/node-sdk": "^1.60.0",
"@sinclair/typebox": "0.34.49",
"qrcode-terminal": "^0.12.0"
},
"openclaw": {
"bundle": { "stageRuntimeDependencies": true },
...
}
}
The manifest's bundle.stageRuntimeDependencies: true flag suggests intent to ship runtime deps; the publish pipeline does not act on it.
openclaw root package.json files array (lines 23–51) explicitly excludes per-extension node_modules:
"files": [
"CHANGELOG.md",
"LICENSE",
"openclaw.mjs",
"README.md",
"assets/",
"dist/",
"!dist/**/*.map",
"!dist/plugin-sdk/.tsbuildinfo",
"!dist/extensions/node_modules/**",
"!dist/extensions/*/node_modules/**",
...
]
Result: dist/extensions/feishu/node_modules/ does not exist on a vanilla install. The SDK is declared but never published to disk.
Load chain api.js → drive → client → @larksuiteoapi/node-sdk (this is what the disable command resolves before honoring the flag):
dist/extensions/feishu/api.js:1:
import { n as listEnabledFeishuAccounts } from "./accounts-C32zclXX.js";
dist/extensions/feishu/api.js:7:
import { ... } from "./drive-CqL2E2AR.js";
dist/extensions/feishu/drive-CqL2E2AR.js:2:
import { r as createFeishuClient } from "./client-yWGpoGkZ.js";
dist/extensions/feishu/client-yWGpoGkZ.js:3:
import * as Lark from "@larksuiteoapi/node-sdk";
Production log evidence (recurring over 10+ days):
2026-04-25T12:20:55-04:00 [reload] config restart failed: Error: Cannot find module '@larksuiteoapi/node-sdk'
2026-04-27T04:00:39-04:00 [gateway] request handler failed: Error: Cannot find module '@larksuiteoapi/node-sdk'
2026-05-03T19:28:29-04:00 [reload] config restart failed: Error: Cannot find module '@larksuiteoapi/node-sdk'
2026-05-04T04:00:40-04:00 [gateway] request handler failed: Error: Cannot find module '@larksuiteoapi/node-sdk'
2026-05-04T13:42:37-04:00 [reload] config restart failed: Error: Cannot find module '@larksuiteoapi/node-sdk'
2026-05-05T12:59:28-04:00 [reload] config restart failed: Error: Cannot find module '@larksuiteoapi/node-sdk'
2026-05-05T17:06:51-04:00 [reload] config restart failed: Error: Cannot find module '@larksuiteoapi/node-sdk'
Each error referenced dist/extensions/feishu/client-yWGpoGkZ.js as the failing require site.
openclaw plugins inspect feishu before workaround:
Status: Error: bundled (disabled by default)
Error: Cannot find module '@larksuiteoapi/node-sdk'
Suggested fix directions (any one closes the bug)
- (a) Honor the enabled flag earlier — the highest-leverage path. Make both the gateway request handler and the CLI's
plugins disable resolve plugins.entries.<id>.enabled BEFORE doing any require() of the extension's api. The config-reload watcher already does this — generalize the pattern. This also fixes the broken plugins disable CLI.
- (b) Mark the SDK optional — move
@larksuiteoapi/node-sdk to peerDependenciesMeta.optional = true and gate the import behind a runtime feature check (lazy await import() inside an async setup path that's only called when a feishu channel is actually wired in plugins.entries).
- (c) Ship the dep — drop
!dist/extensions/*/node_modules/** from the root files array, OR hoist @larksuiteoapi/node-sdk into the openclaw root dependencies. The bundle.stageRuntimeDependencies: true flag in the feishu manifest already signals intent; honor it in the publish pipeline.
(a) is the most defensive — it makes the host robust to any bundled plugin's missing-dep failure, not just feishu's. (c) is the narrowest fix for this specific plugin.
Notes for upstream
- The
bundle.stageRuntimeDependencies: true flag is present in the feishu manifest but appears to be unused by the current publish step. If it is intended to drive the include logic for dist/extensions/<id>/node_modules/, the negation rule in openclaw/package.json files (!dist/extensions/*/node_modules/**) overrides it.
- The same class of bug likely affects any bundled extension with a runtime dep that isn't in openclaw's root
dependencies. A scan for other import ... from "<external-pkg>" lines in dist/extensions/*/ would surface peers.
Environment
2026.4.21(commitf788c88), installed viabrew install openclaw(/opt/homebrew/lib/node_modules/openclaw)@openclaw/feishu2026.4.20(bundled,dist/extensions/feishu/)v25.6.126.2(Darwin25.2.0)Summary
A vanilla install of openclaw leaves the bundled
feishuplugin with an unresolvablerequire('@larksuiteoapi/node-sdk'). Two upstream code paths still load the extension before honoring the enabled flag — the gateway request handler and the config-reload pipeline — so the error fires recurrently even when the user has never configured Feishu. Bothopenclaw plugins disable feishuandopenclaw plugins uninstall feishufail to fix it:disableitself crashes with the sameMODULE_NOT_FOUND(its plugin-resolution path eagerly loads the api chain before writing the disable flag), anduninstallrefuses because feishu isorigin: bundled. The only working remediation is hand-editingopenclaw.jsonto addplugins.entries.feishu = { enabled: false }.Reproduction
brew install openclaw(ornpm i -g openclaw).~/.openclaw/openclaw.json, runopenclaw doctor, or restart the gateway).gateway.err.log:gateway.err.log:openclaw plugins disable feishu. Crashes with the sameMODULE_NOT_FOUND— the disable command's plugin-resolution path loadsfeishu/api.js → drive → client → @larksuiteoapi/node-sdkbefore writing the disable flag.openclaw plugins uninstall feishu. Refuses withPlugin 'feishu' is not managed by plugins config/install records and cannot be uninstalledbecause feishu isorigin: bundled(not separately installed).Observed behavior
MODULE_NOT_FOUNDin two production paths: the config-reload watcher (everyopenclaw.jsonrewrite/hot-reload) and the gateway request handler (any external capability probe). 7 occurrences in the localgateway.err.logover a 13-day window (the path only fires when triggered, not continuously, but every trigger fails).plugins disableCLI crashes with the same error it is meant to silence. The CLI is structurally unable to fix this bug.plugins uninstallCLI rejects bundled plugins by design.~/.openclaw/openclaw.jsonand addplugins.entries.feishu = { enabled: false }. The config-reload watcher checksplugins.entries.<id>.enabledBEFORE requiring the extension api, so this disables cleanly. Verified viaopenclaw daemon restart+ 30s tail ofgateway.err.log: zero subsequentlarksuiteoapi/feishu/MODULE_NOT_FOUNDoccurrences.openclaw plugins inspect feishustatus changed fromError: bundled (disabled by default)toError: disabled in config.Expected behavior
A bundled plugin the user has never configured should not be able to crash the config-reload pipeline or the gateway request handler.
openclaw plugins disable <id>should never fail with the same error it is meant to silence.Evidence
dist/extensions/feishu/package.jsondeclares the SDK as a runtime dep:{ "name": "@openclaw/feishu", "version": "2026.4.20", "dependencies": { "@larksuiteoapi/node-sdk": "^1.60.0", "@sinclair/typebox": "0.34.49", "qrcode-terminal": "^0.12.0" }, "openclaw": { "bundle": { "stageRuntimeDependencies": true }, ... } }The manifest's
bundle.stageRuntimeDependencies: trueflag suggests intent to ship runtime deps; the publish pipeline does not act on it.openclawrootpackage.jsonfilesarray (lines 23–51) explicitly excludes per-extensionnode_modules:Result:
dist/extensions/feishu/node_modules/does not exist on a vanilla install. The SDK is declared but never published to disk.Load chain
api.js → drive → client → @larksuiteoapi/node-sdk(this is what the disable command resolves before honoring the flag):dist/extensions/feishu/api.js:1:dist/extensions/feishu/api.js:7:dist/extensions/feishu/drive-CqL2E2AR.js:2:dist/extensions/feishu/client-yWGpoGkZ.js:3:Production log evidence (recurring over 10+ days):
Each error referenced
dist/extensions/feishu/client-yWGpoGkZ.jsas the failing require site.openclaw plugins inspect feishubefore workaround:Suggested fix directions (any one closes the bug)
plugins disableresolveplugins.entries.<id>.enabledBEFORE doing anyrequire()of the extension's api. The config-reload watcher already does this — generalize the pattern. This also fixes the brokenplugins disableCLI.@larksuiteoapi/node-sdktopeerDependenciesMeta.optional = trueand gate the import behind a runtime feature check (lazyawait import()inside an async setup path that's only called when a feishu channel is actually wired inplugins.entries).!dist/extensions/*/node_modules/**from the rootfilesarray, OR hoist@larksuiteoapi/node-sdkinto the openclaw rootdependencies. Thebundle.stageRuntimeDependencies: trueflag in the feishu manifest already signals intent; honor it in the publish pipeline.(a) is the most defensive — it makes the host robust to any bundled plugin's missing-dep failure, not just feishu's. (c) is the narrowest fix for this specific plugin.
Notes for upstream
bundle.stageRuntimeDependencies: trueflag is present in the feishu manifest but appears to be unused by the current publish step. If it is intended to drive the include logic fordist/extensions/<id>/node_modules/, the negation rule inopenclaw/package.jsonfiles(!dist/extensions/*/node_modules/**) overrides it.dependencies. A scan for otherimport ... from "<external-pkg>"lines indist/extensions/*/would surface peers.