openclaw - 💡(How to fix) Fix [Bug]: `bundled-deps installer omits the host openclaw package; Discord channel and 7 other extensions break with `Cannot find package 'openclaw' [1 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#71484Fetched 2026-04-26 05:12:20
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1cross-referenced ×1labeled ×1

On Linux (Ubuntu under WSL2, Node 22.22.0, openclaw 2026.4.22 installed globally via npm i -g openclaw), the gateway's bundled-runtime-deps installer for the plugin-runtime-deps tree populates ~250 transitive packages but does not install the openclaw package itself, neither as a real install nor as a symlink. As a result, every extension that imports a subpath of openclaw/* fails with ERR_MODULE_NOT_FOUND and crashes on startup. The Discord channel goes into exponential backoff and after 10 retries it gives up entirely.

openclaw doctor --fix does not detect or fix this; the doctor command also hangs (no output) when the gateway is in this state.

Root Cause

On Linux (Ubuntu under WSL2, Node 22.22.0, openclaw 2026.4.22 installed globally via npm i -g openclaw), the gateway's bundled-runtime-deps installer for the plugin-runtime-deps tree populates ~250 transitive packages but does not install the openclaw package itself, neither as a real install nor as a symlink. As a result, every extension that imports a subpath of openclaw/* fails with ERR_MODULE_NOT_FOUND and crashes on startup. The Discord channel goes into exponential backoff and after 10 retries it gives up entirely.

openclaw doctor --fix does not detect or fix this; the doctor command also hangs (no output) when the gateway is in this state.

Code Example

systemctl --user stop openclaw-gateway
rm -rf ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-*/
systemctl --user start openclaw-gateway
journalctl --user -u openclaw-gateway -f | grep -i "Cannot find package"

---

[plugins] discord installed bundled runtime deps: @buape/carbon@0.16.0, @discordjs/voice@^0.19.2, discord-api-types@^0.38.47, https-proxy-agent@^9.0.0, opusscript@^0.0.8, typebox@1.1.28, undici@8.1.0, ws@^8.20.0
[plugins] telegram installed bundled runtime deps: @grammyjs/runner@^2.0.3, ...
[gateway] ready (7 plugins: acpx, browser, device-pair, discord, phone-control, talk-voice, telegram; 32.9s)
[delivery-recovery] Retry failed for delivery 96e1dd21-...: Cannot find package 'openclaw' imported from /home/USER/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-4eca5026e977/dist/extensions/discord/send-lsr_UsIt.js
[discord] [default] starting provider
[discord] [default] channel exited: Cannot find package 'openclaw' imported from /home/USER/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-4eca5026e977/dist/extensions/discord/provider-DYru-eTz.js
[discord] [default] auto-restart attempt 1/10 in 5s
... exponential backoff: 5s, 10s, 21s, 41s, 81s, 162s, 300s, then halts

---

[plugins] discord installed bundled runtime deps: @buape/carbon@0.16.0, @discordjs/voice@^0.19.2, discord-api-types@^0.38.47, https-proxy-agent@^9.0.0, opusscript@^0.0.8, typebox@1.1.28, undici@8.1.0, ws@^8.20.0
[plugins] telegram installed bundled runtime deps: @grammyjs/runner@^2.0.3, ...
[gateway] ready (7 plugins: acpx, browser, device-pair, discord, phone-control, talk-voice, telegram; 32.9s)
[delivery-recovery] Retry failed for delivery 96e1dd21-...: Cannot find package 'openclaw' imported from /home/USER/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-4eca5026e977/dist/extensions/discord/send-lsr_UsIt.js
[discord] [default] starting provider
[discord] [default] channel exited: Cannot find package 'openclaw' imported from /home/USER/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-4eca5026e977/dist/extensions/discord/provider-DYru-eTz.js
[discord] [default] auto-restart attempt 1/10 in 5s
... exponential backoff: 5s, 10s, 21s, 41s, 81s, 162s, 300s, then halts


`curl http://127.0.0.1:18789/` hangs (read timeout) for the entire boot window while these retries run; the HTTP gateway only becomes responsive after the channel installs settle (or fail terminally).

---

acpx, amazon-bedrock, amazon-bedrock-mantle, anthropic, codex, discord, google, telegram

---

import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
import { chunkItems, logDebug, logError, ... } from "openclaw/plugin-sdk/text-runtime";
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
import { isDangerousNameMatchingEnabled, loadConfig, ... } from "openclaw/plugin-sdk/config-runtime";
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

On Linux (Ubuntu under WSL2, Node 22.22.0, openclaw 2026.4.22 installed globally via npm i -g openclaw), the gateway's bundled-runtime-deps installer for the plugin-runtime-deps tree populates ~250 transitive packages but does not install the openclaw package itself, neither as a real install nor as a symlink. As a result, every extension that imports a subpath of openclaw/* fails with ERR_MODULE_NOT_FOUND and crashes on startup. The Discord channel goes into exponential backoff and after 10 retries it gives up entirely.

openclaw doctor --fix does not detect or fix this; the doctor command also hangs (no output) when the gateway is in this state.

Steps to reproduce

  1. Fresh Linux host with openclaw installed globally (npm i -g openclaw).
  2. Configure Discord channel in ~/.openclaw/openclaw.json (token + at least one guild/channel).
  3. Start the gateway via systemctl --user start openclaw-gateway.
  4. Observe ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-<HASH>/node_modules/ after the gateway runs its bundled-deps install — there is no openclaw entry.
  5. Discord channel crash-loops with Cannot find package 'openclaw'.

Easy way to reproduce on an existing working install: delete the version dir and restart the service.

systemctl --user stop openclaw-gateway
rm -rf ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-*/
systemctl --user start openclaw-gateway
journalctl --user -u openclaw-gateway -f | grep -i "Cannot find package"

Expected behavior

Suggested fixes (in order of preference)

  1. Have the bundled-deps installer add openclaw as a peer of the version dir, either:
    • real install (npm install --no-save openclaw@<sameVersion> into the version dir), or
    • symlink to the host install when versions match (ln -s $(npm root -g)/openclaw ./node_modules/openclaw).
  2. Set NODE_PATH=$(npm root -g) in the systemd unit. Cheaper but pollutes resolution for everything; not preferred.
  3. Don't import openclaw/* from the published extension bundles — bundle the plugin-sdk subset each extension actually needs. Avoids the peer-dep entirely. Most invasive.

Doctor command behavior

openclaw doctor --fix produces zero output for at least 3 minutes when the gateway is in this state and was killed by an external 180s timeout. It would be helpful for doctor to print which checks it is running and surface the failed import 'openclaw' resolution.

Actual behavior

Symptom (real journalctl output)

[plugins] discord installed bundled runtime deps: @buape/[email protected], @discordjs/voice@^0.19.2, discord-api-types@^0.38.47, https-proxy-agent@^9.0.0, opusscript@^0.0.8, [email protected], [email protected], ws@^8.20.0
[plugins] telegram installed bundled runtime deps: @grammyjs/runner@^2.0.3, ...
[gateway] ready (7 plugins: acpx, browser, device-pair, discord, phone-control, talk-voice, telegram; 32.9s)
[delivery-recovery] Retry failed for delivery 96e1dd21-...: Cannot find package 'openclaw' imported from /home/USER/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-4eca5026e977/dist/extensions/discord/send-lsr_UsIt.js
[discord] [default] starting provider
[discord] [default] channel exited: Cannot find package 'openclaw' imported from /home/USER/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-4eca5026e977/dist/extensions/discord/provider-DYru-eTz.js
[discord] [default] auto-restart attempt 1/10 in 5s
... exponential backoff: 5s, 10s, 21s, 41s, 81s, 162s, 300s, then halts

curl http://127.0.0.1:18789/ hangs (read timeout) for the entire boot window while these retries run; the HTTP gateway only becomes responsive after the channel installs settle (or fail terminally).

OpenClaw version

openclaw 2026.4.22 (gateway service version 2026.4.5, host CLI 2026.4.22)

Operating system

Linux 6.6.87.2-microsoft-standard-WSL2 (Ubuntu, systemd-user managed)

Install method

Node v22.22.0

Model

all

Provider / routing chain

all

Additional provider/model setup details

No response

Logs, screenshots, and evidence

[plugins] discord installed bundled runtime deps: @buape/[email protected], @discordjs/voice@^0.19.2, discord-api-types@^0.38.47, https-proxy-agent@^9.0.0, opusscript@^0.0.8, [email protected], [email protected], ws@^8.20.0
[plugins] telegram installed bundled runtime deps: @grammyjs/runner@^2.0.3, ...
[gateway] ready (7 plugins: acpx, browser, device-pair, discord, phone-control, talk-voice, telegram; 32.9s)
[delivery-recovery] Retry failed for delivery 96e1dd21-...: Cannot find package 'openclaw' imported from /home/USER/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-4eca5026e977/dist/extensions/discord/send-lsr_UsIt.js
[discord] [default] starting provider
[discord] [default] channel exited: Cannot find package 'openclaw' imported from /home/USER/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-4eca5026e977/dist/extensions/discord/provider-DYru-eTz.js
[discord] [default] auto-restart attempt 1/10 in 5s
... exponential backoff: 5s, 10s, 21s, 41s, 81s, 162s, 300s, then halts


`curl http://127.0.0.1:18789/` hangs (read timeout) for the entire boot window while these retries run; the HTTP gateway only becomes responsive after the channel installs settle (or fail terminally).

Impact and severity

Affected extensions

8 extensions in the published dist/extensions/ import openclaw/* subpaths:

acpx, amazon-bedrock, amazon-bedrock-mantle, anthropic, codex, discord, google, telegram

Sample imports from dist/extensions/discord/provider-DYru-eTz.js:

import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
import { chunkItems, logDebug, logError, ... } from "openclaw/plugin-sdk/text-runtime";
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
import { isDangerousNameMatchingEnabled, loadConfig, ... } from "openclaw/plugin-sdk/config-runtime";
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";

Additional information

No response

extent analysis

TL;DR

The most likely fix is to have the bundled-deps installer add openclaw as a peer of the version dir, either as a real install or a symlink to the host install when versions match.

Guidance

  • Verify that the openclaw package is not installed in the ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.22-<HASH>/node_modules/ directory after the gateway runs its bundled-deps install.
  • Check the openclaw version installed globally via npm ls -g openclaw and compare it with the version used by the gateway.
  • Consider setting NODE_PATH=$(npm root -g) in the systemd unit as a temporary workaround, although this may pollute resolution for other packages.
  • Review the suggested fixes in the issue, including adding openclaw as a peer dependency or bundling the plugin-sdk subset for each extension.

Example

No code snippet is provided as the issue does not require a specific code change, but rather a configuration or installation adjustment.

Notes

The issue seems to be related to the way the openclaw package is installed and resolved by the gateway. The provided steps to reproduce and the expected behavior suggest that the issue is specific to the Linux environment and the openclaw version 2026.4.22.

Recommendation

Apply the suggested fix of having the bundled-deps installer add openclaw as a peer of the version dir, either as a real install or a symlink to the host install when versions match, as this is the most preferred solution according to the issue description.

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

Suggested fixes (in order of preference)

  1. Have the bundled-deps installer add openclaw as a peer of the version dir, either:
    • real install (npm install --no-save openclaw@<sameVersion> into the version dir), or
    • symlink to the host install when versions match (ln -s $(npm root -g)/openclaw ./node_modules/openclaw).
  2. Set NODE_PATH=$(npm root -g) in the systemd unit. Cheaper but pollutes resolution for everything; not preferred.
  3. Don't import openclaw/* from the published extension bundles — bundle the plugin-sdk subset each extension actually needs. Avoids the peer-dep entirely. Most invasive.

Doctor command behavior

openclaw doctor --fix produces zero output for at least 3 minutes when the gateway is in this state and was killed by an external 180s timeout. It would be helpful for doctor to print which checks it is running and surface the failed import 'openclaw' resolution.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: `bundled-deps installer omits the host openclaw package; Discord channel and 7 other extensions break with `Cannot find package 'openclaw' [1 comments, 2 participants]