openclaw - 💡(How to fix) Fix v2026.4.5: Missing runtime dependencies cause CLI crash on fresh global install [1 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#62071Fetched 2026-04-08 03:09:25
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
3
Author
Participants

A fresh npm install -g openclaw of v2026.4.5 crashes immediately on any command (e.g. openclaw doctor) because 8 packages are imported in the bundled dist files but not declared in package.json dependencies.

This affects anyone doing a clean global install or update. It is not environment-specific — npm only installs declared dependencies, so the missing packages are never present.

Error Message

$ openclaw doctor
[openclaw] Failed to start CLI: Error: Cannot find module '@buape/carbon'
Require stack:
- /opt/homebrew/lib/node_modules/openclaw/dist/ui-7MjYF8PY.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1383:15)
    at Function.resolve (node:internal/modules/helpers:157:19)
    at jitiResolve (/opt/homebrew/lib/node_modules/openclaw/node_modules/jiti/dist/jiti.cjs:1:148703)
    ...

After manually installing @buape/carbon, the next missing module surfaces (@larksuiteoapi/node-sdk), and so on — it's a chain of failures.

Root Cause

These packages appear to be externalized from the bundle (not inlined into the dist output) but were omitted from the dependencies field in package.json. They may have been present as transitive or dev dependencies during development, masking the issue in the build environment.

Fix Action

Workaround

Manually install the missing packages into openclaw's global node_modules:

npm install \
  @buape/[email protected] \
  @grammyjs/runner \
  @grammyjs/transformer-throttler \
  @jimp/utils \
  @larksuiteoapi/node-sdk \
  @slack/bolt \
  @slack/web-api \
  grammy \
  jimp \
  --prefix /opt/homebrew/lib/node_modules/openclaw

(Adjust the --prefix path if your global node_modules is elsewhere, e.g. $(npm root -g)/openclaw would be the equivalent.)

Code Example

$ openclaw doctor
[openclaw] Failed to start CLI: Error: Cannot find module '@buape/carbon'
Require stack:
- /opt/homebrew/lib/node_modules/openclaw/dist/ui-7MjYF8PY.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1383:15)
    at Function.resolve (node:internal/modules/helpers:157:19)
    at jitiResolve (/opt/homebrew/lib/node_modules/openclaw/node_modules/jiti/dist/jiti.cjs:1:148703)
    ...

---

npm install \
  @buape/carbon@0.14.0 \
  @grammyjs/runner \
  @grammyjs/transformer-throttler \
  @jimp/utils \
  @larksuiteoapi/node-sdk \
  @slack/bolt \
  @slack/web-api \
  grammy \
  jimp \
  --prefix /opt/homebrew/lib/node_modules/openclaw
RAW_BUFFERClick to expand / collapse

Summary

A fresh npm install -g openclaw of v2026.4.5 crashes immediately on any command (e.g. openclaw doctor) because 8 packages are imported in the bundled dist files but not declared in package.json dependencies.

This affects anyone doing a clean global install or update. It is not environment-specific — npm only installs declared dependencies, so the missing packages are never present.

Error

$ openclaw doctor
[openclaw] Failed to start CLI: Error: Cannot find module '@buape/carbon'
Require stack:
- /opt/homebrew/lib/node_modules/openclaw/dist/ui-7MjYF8PY.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1383:15)
    at Function.resolve (node:internal/modules/helpers:157:19)
    at jitiResolve (/opt/homebrew/lib/node_modules/openclaw/node_modules/jiti/dist/jiti.cjs:1:148703)
    ...

After manually installing @buape/carbon, the next missing module surfaces (@larksuiteoapi/node-sdk), and so on — it's a chain of failures.

Missing packages

The following packages are imported in the bundled dist/ files but not listed in package.json dependencies:

PackageImported in
@buape/carbondist/ui-7MjYF8PY.js, dist/components-BqxNThqT.js, dist/send.components-V8HeB7M8.js
@larksuiteoapi/node-sdkdist/probe-Y2l52Hc0.js (Feishu/Lark channel)
grammydist files (Telegram channel)
@grammyjs/runnerdist files (Telegram channel)
@grammyjs/transformer-throttlerdist files (Telegram channel)
@slack/boltdist files (Slack channel)
@slack/web-apidist files (Slack channel)
jimpdist files
@jimp/utilsdist files

Workaround

Manually install the missing packages into openclaw's global node_modules:

npm install \
  @buape/[email protected] \
  @grammyjs/runner \
  @grammyjs/transformer-throttler \
  @jimp/utils \
  @larksuiteoapi/node-sdk \
  @slack/bolt \
  @slack/web-api \
  grammy \
  jimp \
  --prefix /opt/homebrew/lib/node_modules/openclaw

(Adjust the --prefix path if your global node_modules is elsewhere, e.g. $(npm root -g)/openclaw would be the equivalent.)

Root cause

These packages appear to be externalized from the bundle (not inlined into the dist output) but were omitted from the dependencies field in package.json. They may have been present as transitive or dev dependencies during development, masking the issue in the build environment.

Suggested fix

Add all 9 packages to dependencies in package.json with appropriate version constraints. Alternatively, if these are optional channel integrations, consider either:

  • Inlining them into the bundle so they don't need to be resolved at runtime, or
  • Using dynamic imports with proper try/catch so the CLI doesn't crash when an unused channel's dependency is missing

Environment

  • openclaw version: 2026.4.5
  • Node.js: v22.22.0
  • npm: 10.9.4
  • OS: macOS (Apple Silicon, Homebrew)

extent analysis

TL;DR

Manually installing the missing packages into openclaw's global node_modules or adding them to dependencies in package.json can resolve the issue.

Guidance

  • Manually install the missing packages using the provided npm install command with the --prefix option to specify the correct location of openclaw's global node_modules.
  • Add the missing packages to dependencies in package.json with appropriate version constraints to ensure they are installed during the installation process.
  • Consider inlining the packages into the bundle or using dynamic imports with proper error handling for optional channel integrations.
  • Verify the fix by running openclaw doctor or other commands to ensure they no longer crash due to missing modules.

Example

The provided npm install command can be used as a workaround:

npm install \
  @buape/[email protected] \
  @grammyjs/runner \
  @grammyjs/transformer-throttler \
  @jimp/utils \
  @larksuiteoapi/node-sdk \
  @slack/bolt \
  @slack/web-api \
  grammy \
  jimp \
  --prefix /opt/homebrew/lib/node_modules/openclaw

Notes

The root cause of the issue is the omission of dependencies from package.json, which can be resolved by adding them or using alternative approaches like inlining or dynamic imports.

Recommendation

Apply the workaround by manually installing the missing packages or add them to dependencies in package.json to ensure a stable and functional openclaw installation. This approach is recommended because it directly addresses the root cause of the issue and provides a straightforward solution.

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