Bug type: Regression (worked before, now fails)
Beta release blocker: No
Summary
After upgrading from a previous npm global install to OpenClaw 2026.4.x (tested on 2026.4.3 and 2026.4.5), every CLI command fails with Cannot find module for channel plugin dependencies (@slack/logger, @buape/carbon, @larksuiteoapi/node-sdk, grammy), because the packageManager: pnpm declaration causes npm to silently drop these packages during global install hoisting.
Steps to reproduce
- Install OpenClaw globally via npm:
npm install -g openclaw@2026.4.5
- Run any command:
openclaw gateway restart, openclaw doctor, or openclaw security audit --deep
- Observe
Cannot find module '<channel-plugin-dep>' crash before any command completes.
- Run
npm install --prefix /Users/claw/.npm-global/lib/node_modules/openclaw <missing-package> to fix the reported package.
- Re-run the same command — a different missing package surfaces from a different channel plugin.
- Repeat: each command that loads a different channel plugin extension reveals a new missing dependency.
Expected behavior
In all prior OpenClaw versions installed via npm install -g openclaw, all required runtime dependencies were present and every CLI command completed without MODULE_NOT_FOUND errors.
Actual behavior
Every CLI command crashes immediately with Cannot find module before completing. The missing packages cascade in this confirmed order across three separate reinstall attempts:
@slack/logger (Slack channel plugin, extensions/slack/channel-plugin-api.js)
@buape/carbon (Discord channel plugin, extensions/discord/channel-plugin-api.js)
@larksuiteoapi/node-sdk (Feishu channel plugin, extensions/feishu/api.js)
grammy (Telegram channel plugin, allowed-updates-CPeb0arL.js)
openclaw doctor --fix and openclaw security audit --deep are both unreachable. The gateway aborts on config read.
OpenClaw version
2026.4.5 (3e72c03) — also reproduced on 2026.4.3
Operating system
macOS 26.3.1 (Apple Silicon, Mac Mini, arm64)
Install method
npm global (npm install -g openclaw) — this is the install method that triggers the bug. Workaround: pnpm add -g openclaw resolves all dependencies correctly.
Model
anthropic/claude-opus-4-6
Provider / routing chain
openclaw -> anthropic
Additional provider/model setup details
Not relevant to this bug. The failure occurs before config is read, during channel plugin bootstrapping in bootstrap-registry-DSG7nIY1.js → channel-entry-contract-DyY5TZkc.js → individual extension entry points loaded via jiti.
Logs
[openclaw] Failed to start CLI: Error: Cannot find module '@slack/logger'
Require stack:
- /Users/claw/.npm-global/lib/node_modules/openclaw/node_modules/@slack/web-api/dist/logger.js
code: 'MODULE_NOT_FOUND'
[openclaw] Failed to start CLI: Error: Cannot find module '@buape/carbon'
Require stack:
- /Users/claw/.npm-global/lib/node_modules/openclaw/dist/ui-7MjYF8PY.js
code: 'MODULE_NOT_FOUND'
[openclaw] Failed to start CLI: Error: Cannot find module '@larksuiteoapi/node-sdk'
Require stack:
- /Users/claw/.npm-global/lib/node_modules/openclaw/dist/probe-Y2l52Hc0.js
code: 'MODULE_NOT_FOUND'
[openclaw] Failed to start CLI: Error: Cannot find module 'grammy'
Require stack:
- /Users/claw/.npm-global/lib/node_modules/openclaw/dist/allowed-updates-CPeb0arL.js
code: 'MODULE_NOT_FOUND'
Impact and severity
- Affected: Any user who installed or updated OpenClaw 2026.4.x via
npm install -g openclaw (the install method documented in most guides and READMEs).
- Severity: Critical — the gateway cannot start,
openclaw doctor is unreachable, and no CLI commands complete. The install is fully non-functional.
- Frequency: 100% reproducible on a clean npm global install of 2026.4.x.
- Consequence: Users are locked out of their OpenClaw instance entirely, with no path to self-repair via the standard
openclaw doctor workflow since doctor itself crashes.
Additional information
Root cause: package.json declares "packageManager": "pnpm@10.32.1". pnpm's non-flat, content-addressable node_modules layout is assumed at runtime by jiti's module resolution. npm's flat hoisting does not replicate this layout, so external channel plugin dependencies are silently omitted.
Workaround (confirmed working): uninstall via npm, install via pnpm:
npm uninstall -g openclaw
pnpm setup && source ~/.zshrc
pnpm add -g openclaw@2026.4.5
Suggested fix: either (a) add an engines or install-time check that warns when npm is used instead of pnpm, (b) bundle all channel plugin dependencies into the dist so no external resolution is needed, or (c) update the README and npm page to document that pnpm add -g is required for 2026.4.x.
Last known good install method: npm global (version prior to 2026.4.x). First known bad: 2026.4.3.
Bug type: Regression (worked before, now fails)
Beta release blocker: No
Summary
After upgrading from a previous npm global install to OpenClaw 2026.4.x (tested on 2026.4.3 and 2026.4.5), every CLI command fails with
Cannot find modulefor channel plugin dependencies (@slack/logger,@buape/carbon,@larksuiteoapi/node-sdk,grammy), because thepackageManager: pnpmdeclaration causes npm to silently drop these packages during global install hoisting.Steps to reproduce
npm install -g openclaw@2026.4.5openclaw gateway restart,openclaw doctor, oropenclaw security audit --deepCannot find module '<channel-plugin-dep>'crash before any command completes.npm install --prefix /Users/claw/.npm-global/lib/node_modules/openclaw <missing-package>to fix the reported package.Expected behavior
In all prior OpenClaw versions installed via
npm install -g openclaw, all required runtime dependencies were present and every CLI command completed withoutMODULE_NOT_FOUNDerrors.Actual behavior
Every CLI command crashes immediately with
Cannot find modulebefore completing. The missing packages cascade in this confirmed order across three separate reinstall attempts:@slack/logger(Slack channel plugin,extensions/slack/channel-plugin-api.js)@buape/carbon(Discord channel plugin,extensions/discord/channel-plugin-api.js)@larksuiteoapi/node-sdk(Feishu channel plugin,extensions/feishu/api.js)grammy(Telegram channel plugin,allowed-updates-CPeb0arL.js)openclaw doctor --fixandopenclaw security audit --deepare both unreachable. The gateway aborts on config read.OpenClaw version
2026.4.5 (3e72c03) — also reproduced on 2026.4.3
Operating system
macOS 26.3.1 (Apple Silicon, Mac Mini, arm64)
Install method
npm global (
npm install -g openclaw) — this is the install method that triggers the bug. Workaround:pnpm add -g openclawresolves all dependencies correctly.Model
anthropic/claude-opus-4-6
Provider / routing chain
openclaw -> anthropic
Additional provider/model setup details
Not relevant to this bug. The failure occurs before config is read, during channel plugin bootstrapping in
bootstrap-registry-DSG7nIY1.js→channel-entry-contract-DyY5TZkc.js→ individual extension entry points loaded viajiti.Logs
Impact and severity
npm install -g openclaw(the install method documented in most guides and READMEs).openclaw doctoris unreachable, and no CLI commands complete. The install is fully non-functional.openclaw doctorworkflow since doctor itself crashes.Additional information
Root cause:
package.jsondeclares"packageManager": "pnpm@10.32.1". pnpm's non-flat, content-addressablenode_moduleslayout is assumed at runtime byjiti's module resolution. npm's flat hoisting does not replicate this layout, so external channel plugin dependencies are silently omitted.Workaround (confirmed working): uninstall via npm, install via pnpm:
Suggested fix: either (a) add an
enginesor install-time check that warns when npm is used instead of pnpm, (b) bundle all channel plugin dependencies into the dist so no external resolution is needed, or (c) update the README and npm page to document thatpnpm add -gis required for 2026.4.x.Last known good install method: npm global (version prior to 2026.4.x). First known bad: 2026.4.3.