openclaw - 💡(How to fix) Fix npm install -g openclaw still missing bundled extension dependencies (regression from #52719) [2 comments, 2 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#62242Fetched 2026-04-08 03:07:19
View on GitHub
Comments
2
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
commented ×2

#52719 was closed as fixed, but the npm distribution (npm install -g openclaw@latest) still does not include channel extension dependencies. The CLI crashes on startup with Cannot find module errors, and openclaw update cannot recover because it runs npm install -g first (which wipes any manually-installed deps), then tries to run openclaw doctor — which crashes for the same reason.

Error Message

[openclaw] Failed to start CLI: Error: Cannot find module '@buape/carbon'

Error: Cannot find module '@buape/carbon'

Root Cause

#52719 was closed as fixed, but the npm distribution (npm install -g openclaw@latest) still does not include channel extension dependencies. The CLI crashes on startup with Cannot find module errors, and openclaw update cannot recover because it runs npm install -g first (which wipes any manually-installed deps), then tries to run openclaw doctor — which crashes for the same reason.

RAW_BUFFERClick to expand / collapse

Summary

#52719 was closed as fixed, but the npm distribution (npm install -g openclaw@latest) still does not include channel extension dependencies. The CLI crashes on startup with Cannot find module errors, and openclaw update cannot recover because it runs npm install -g first (which wipes any manually-installed deps), then tries to run openclaw doctor — which crashes for the same reason.

Environment

  • OpenClaw 2026.4.5 (3e72c03)
  • Node v22.22.1
  • Installed via npm install -g openclaw inside Docker (node:22-slim)

Reproduction

```bash

Fresh install

npm install -g openclaw

Immediate crash

openclaw gateway

[openclaw] Failed to start CLI: Error: Cannot find module '@buape/carbon'

openclaw update also crashes

openclaw update

✓ global update (123.52s)

✗ openclaw doctor (4.1s)

Error: Cannot find module '@buape/carbon'

```

Missing packages

These are imported at runtime but not declared in package.json:

ChannelMissing packages
Telegramgrammy, @grammyjs/runner, @grammyjs/transformer-throttler, @grammyjs/types
Discord@buape/carbon
Feishu/Lark@larksuiteoapi/node-sdk
Slack@slack/web-api

Verified by inspecting package.json — none of these appear in dependencies, peerDependencies, or optionalDependencies.

Self-breaking update cycle

openclaw update cannot fix this because:

  1. It runs npm install -g openclaw → wipes any manually-installed extension deps
  2. It then runs openclaw doctor → CLI crashes because deps are gone
  3. User must manually run npm install grammy @buape/carbon ... to recover

This means there is no safe self-service upgrade path without maintaining a hardcoded list of undeclared dependencies.

Suggested fix

Add these packages to optionalDependencies in package.json. This way:

  • npm install -g openclaw installs them automatically
  • Users who don't need certain channels aren't blocked if a dep fails to install
  • openclaw update stops breaking itself

Alternatively, the openclaw update command could install extension deps before running openclaw doctor, so the CLI doesn't crash mid-update.

extent analysis

TL;DR

Add missing packages to optionalDependencies in package.json to ensure they are installed automatically with npm install -g openclaw.

Guidance

  • Identify the missing packages for each channel (e.g., grammy, @buape/carbon, etc.) and add them to optionalDependencies in package.json.
  • Verify that npm install -g openclaw installs the required dependencies by checking the node_modules directory.
  • Consider modifying the openclaw update command to install extension dependencies before running openclaw doctor to prevent the self-breaking update cycle.
  • Manually install the missing dependencies using npm install as a temporary workaround until the fix is implemented.

Example

// package.json excerpt
"optionalDependencies": {
  "grammy": "^X.X.X",
  "@buape/carbon": "^X.X.X",
  "@grammyjs/runner": "^X.X.X",
  // ... other missing packages ...
}

Notes

The suggested fix assumes that adding the missing packages to optionalDependencies will not introduce any compatibility issues or conflicts with other dependencies.

Recommendation

Apply the workaround by manually installing the missing dependencies until the fix is implemented, as upgrading to a fixed version is not currently available. This will allow users to continue using the application while the issue is being addressed.

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