openclaw - ✅(Solved) Fix [Bug]: npm global install of 2026.4.x silently omits channel plugin dependencies, causing cascading MODULE_NOT_FOUND on every CLI command [1 pull requests, 2 comments, 3 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#61787Fetched 2026-04-08 02:54:33
View on GitHub
Comments
2
Participants
3
Timeline
4
Reactions
0
Author
Timeline (top)
commented ×2cross-referenced ×1referenced ×1

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.

Error Message

[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'

Root Cause

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.

Fix Action

Fix / Workaround

npm global (npm install -g openclaw) — this is the install method that triggers the bug. Workaround: pnpm add -g openclaw resolves all dependencies correctly.

Workaround (confirmed working): uninstall via npm, install via pnpm:

npm uninstall -g openclaw
pnpm setup && source ~/.zshrc
pnpm add -g [email protected]

PR fix notes

PR #61877: docs: warn that npm global install may drop channel plugin dependencies (#61787)

Description (problem / solution / changelog)

Summary

Fixes #61787

When OpenClaw is installed globally with npm install -g, some channel plugin dependencies (@slack/logger, @buape/carbon, grammy, @larksuiteoapi/node-sdk, etc.) fail to resolve at runtime due to pnpm workspace structure incompatibility with npm's flat hoisting strategy.

This is a user-facing documentation fix: add a visible warning block to the README Install section recommending pnpm for global installation, and noting that openclaw doctor --fix also fails in this broken state (so users skip that dead-end recovery step).

Changes

  • Promote pnpm add -g openclaw@latest as the recommended install command
  • Add a callout warning block explaining the npm limitation and known error patterns
  • Note that openclaw doctor --fix does not recover from this state
  • Keep npm as an option for users who prefer it (works in most setups)

Testing

Docs-only change, no code path affected.

Changed files

  • README.md (modified, +11/-1)

Code Example

[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'

---

npm uninstall -g openclaw
pnpm setup && source ~/.zshrc
pnpm add -g openclaw@2026.4.5
RAW_BUFFERClick to expand / collapse

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 [email protected]
  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": "[email protected]". 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 [email protected]

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.

extent analysis

TL;DR

The most likely fix is to install OpenClaw using pnpm add -g openclaw instead of npm install -g openclaw to ensure all dependencies are correctly resolved.

Guidance

  • The issue is caused by the packageManager: pnpm declaration in package.json, which assumes a non-flat node_modules layout that is not replicated by npm's flat hoisting.
  • To fix the issue, uninstall OpenClaw using npm uninstall -g openclaw and then install it using pnpm add -g [email protected].
  • Alternatively, consider adding an engines check or updating the README to document the required install method.
  • Verify the fix by running openclaw commands after installation to ensure they complete without MODULE_NOT_FOUND errors.

Example

npm uninstall -g openclaw
pnpm setup && source ~/.zshrc
pnpm add -g [email protected]

Notes

This fix assumes that pnpm is installed and configured correctly. If pnpm is not installed, run npm install -g pnpm before attempting the fix.

Recommendation

Apply the workaround by installing OpenClaw using pnpm add -g openclaw to ensure all dependencies are correctly resolved. This is the most straightforward solution until a more permanent fix is implemented.

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

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.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING