Skip to content

[Bug]: npm global install of 2026.4.x silently omits channel plugin dependencies, causing cascading MODULE_NOT_FOUND on every CLI command #61787

@redasadki

Description

@redasadki

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

  1. Install OpenClaw globally via npm: npm install -g openclaw@2026.4.5
  2. Run any command: openclaw gateway restart, openclaw doctor, or openclaw security audit --deep
  3. Observe Cannot find module '<channel-plugin-dep>' crash before any command completes.
  4. Run npm install --prefix /Users/claw/.npm-global/lib/node_modules/openclaw <missing-package> to fix the reported package.
  5. Re-run the same command — a different missing package surfaces from a different channel plugin.
  6. 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:

  1. @slack/logger (Slack channel plugin, extensions/slack/channel-plugin-api.js)
  2. @buape/carbon (Discord channel plugin, extensions/discord/channel-plugin-api.js)
  3. @larksuiteoapi/node-sdk (Feishu channel plugin, extensions/feishu/api.js)
  4. 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.jschannel-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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions