openclaw - 💡(How to fix) Fix [Bug]: amazon-bedrock plugin ships incomplete @aws-sdk/client-bedrock (missing dist-cjs/), aborting every CLI command [1 comments, 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#71625Fetched 2026-04-26 05:10:26
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1

In OpenClaw 2026.4.23 the bundled amazon-bedrock plugin ships an incomplete copy of @aws-sdk/[email protected] that is missing dist-cjs/, causing every CLI invocation that loads plugins to print a PluginLoadFailureError stack and abort before executing the requested command (e.g. openclaw message send silently fails to deliver).

Error Message

[plugins] amazon-bedrock failed to load from /home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/index.js: Error: Cannot find module '/home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/node_modules/@aws-sdk/client-bedrock/dist-cjs/index.js'. Please verify that the package.json has a valid "main" entry [openclaw] Failed to start CLI: PluginLoadFailureError: plugin load failed: amazon-bedrock: Error: Cannot find module '/home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/node_modules/@aws-sdk/client-bedrock/dist-cjs/index.js'. Please verify that the package.json has a valid "main" entry at maybeThrowOnPluginLoadError (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/loader-DeOtDUYt.js:2463:8) at loadOpenClawPlugins (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/loader-DeOtDUYt.js:3304:3) at ensurePluginRegistryLoaded (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/runtime-registry-loader-CUj0B49d.js:65:2) at ensureCliPluginRegistryLoaded (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/command-execution-startup-BgJnfxRd.js:20:3) at async ensureCliCommandBootstrap (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/command-execution-startup-BgJnfxRd.js:47:2) at async ensureCliExecutionBootstrap (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/command-execution-startup-BgJnfxRd.js:292:2)

Root Cause

Related (but distinct) prior issues found in repo:

  • #63575 / PR #63586 — proposes filtering strict failures by plugins.allow (not merged at filing time).
  • #70371 / PR #70394 — proposes removing throwOnLoadError: true from validate paths (not merged at filing time). Both of those would alleviate the symptom (the throw), but they do not address the root cause here, which is that the bundler emits an incomplete @aws-sdk/client-bedrock package.

Code Example

openclaw message send --channel telegram --target "<chat_id>" --message "test"

---

ls /home/<user>/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/node_modules/@aws-sdk/client-bedrock/
   # → only dist-types/ and package.json (no dist-cjs/, no dist-es/)

---

npm pack @aws-sdk/client-bedrock@3.1033.0
   tar tzf aws-sdk-client-bedrock-3.1033.0.tgz | grep dist-cjs | head
   # → upstream tarball contains dist-cjs/ as expected

---

[plugins] amazon-bedrock failed to load from /home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/index.js: Error: Cannot find module '/home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/node_modules/@aws-sdk/client-bedrock/dist-cjs/index.js'. Please verify that the package.json has a valid "main" entry
[openclaw] Failed to start CLI: PluginLoadFailureError: plugin load failed: amazon-bedrock: Error: Cannot find module '/home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/node_modules/@aws-sdk/client-bedrock/dist-cjs/index.js'. Please verify that the package.json has a valid "main" entry
    at maybeThrowOnPluginLoadError (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/loader-DeOtDUYt.js:2463:8)
    at loadOpenClawPlugins (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/loader-DeOtDUYt.js:3304:3)
    at ensurePluginRegistryLoaded (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/runtime-registry-loader-CUj0B49d.js:65:2)
    at ensureCliPluginRegistryLoaded (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/command-execution-startup-BgJnfxRd.js:20:3)
    at async ensureCliCommandBootstrap (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/command-execution-startup-BgJnfxRd.js:47:2)
    at async ensureCliExecutionBootstrap (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/command-execution-startup-BgJnfxRd.js:292:2)

---

$ cat /home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/package.json
{
  "name": "@openclaw/amazon-bedrock-provider",
  "version": "2026.4.20",   ← shipped inside OpenClaw 2026.4.23
  ...
  "dependencies": {
    "@aws-sdk/client-bedrock": "3.1033.0",
    ...
  }
}

---

dist-types/
package.json

---

# 1. Confirm shipped contents
$ ls /home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/node_modules/@aws-sdk/client-bedrock/
dist-types  package.json

# 2. The package.json points at a missing main
$ cat .../amazon-bedrock/node_modules/@aws-sdk/client-bedrock/package.json | grep -E '"name"|"version"|"main"'
  "name": "@aws-sdk/client-bedrock",
  "version": "3.1033.0",
  "main": "./dist-cjs/index.js",   ← does not exist on disk

# 3. The upstream tarball is fine
$ npm pack @aws-sdk/client-bedrock@3.1033.0 -q && \
  tar tzf aws-sdk-client-bedrock-3.1033.0.tgz | grep -c "dist-cjs/"
71

# 4. Reproduce the abort
$ openclaw message send --channel telegram --target "-100..." --message "test"
[plugins] amazon-bedrock failed to load …
[openclaw] Failed to start CLI: PluginLoadFailureError: plugin load failed: amazon-bedrock …
$ echo $?
0
RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

In OpenClaw 2026.4.23 the bundled amazon-bedrock plugin ships an incomplete copy of @aws-sdk/[email protected] that is missing dist-cjs/, causing every CLI invocation that loads plugins to print a PluginLoadFailureError stack and abort before executing the requested command (e.g. openclaw message send silently fails to deliver).

Steps to reproduce

  1. Install OpenClaw 2026.4.23 globally (npm i -g [email protected]).
  2. Run any CLI command that triggers plugin loading, for example:
    openclaw message send --channel telegram --target "<chat_id>" --message "test"
  3. Observe the [plugins] amazon-bedrock failed to load line and the [openclaw] Failed to start CLI: PluginLoadFailureError stack on stderr; the message is never sent.
  4. Confirm the missing build by listing the bundled package:
    ls /home/<user>/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/node_modules/@aws-sdk/client-bedrock/
    # → only dist-types/ and package.json (no dist-cjs/, no dist-es/)
  5. Compare with the upstream tarball, which is correctly published:
    npm pack @aws-sdk/[email protected]
    tar tzf aws-sdk-client-bedrock-3.1033.0.tgz | grep dist-cjs | head
    # → upstream tarball contains dist-cjs/ as expected

Expected behavior

CLI commands not related to Amazon Bedrock should succeed regardless of the state of the amazon-bedrock plugin. A missing optional provider plugin must not abort openclaw CLI invocations. Either:

  • the amazon-bedrock plugin should be bundled with a complete @aws-sdk/client-bedrock package (including dist-cjs/), or
  • a missing/incomplete optional provider plugin should degrade gracefully (skip + diagnostic) instead of throwing PluginLoadFailureError and exiting.

Actual behavior

openclaw message send (and other CLI commands that hit ensurePluginRegistryLoaded) print:

[plugins] amazon-bedrock failed to load from /home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/index.js: Error: Cannot find module '/home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/node_modules/@aws-sdk/client-bedrock/dist-cjs/index.js'. Please verify that the package.json has a valid "main" entry
[openclaw] Failed to start CLI: PluginLoadFailureError: plugin load failed: amazon-bedrock: Error: Cannot find module '/home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/node_modules/@aws-sdk/client-bedrock/dist-cjs/index.js'. Please verify that the package.json has a valid "main" entry
    at maybeThrowOnPluginLoadError (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/loader-DeOtDUYt.js:2463:8)
    at loadOpenClawPlugins (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/loader-DeOtDUYt.js:3304:3)
    at ensurePluginRegistryLoaded (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/runtime-registry-loader-CUj0B49d.js:65:2)
    at ensureCliPluginRegistryLoaded (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/command-execution-startup-BgJnfxRd.js:20:3)
    at async ensureCliCommandBootstrap (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/command-execution-startup-BgJnfxRd.js:47:2)
    at async ensureCliExecutionBootstrap (file:///home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/command-execution-startup-BgJnfxRd.js:292:2)

The CLI then exits with code 0 (so wrapper scripts and systemd ExecStart= paths report "success" while the actual command never executes). For example, boot-notify.sh runs openclaw message send --channel telegram --target "-100…" --message "✅ Gateway arrancado y listo.", the unit reports success, but the Telegram notification never reaches the channel.

The same error stack also appears in the gateway journal repeatedly (every time something internally re-loads plugins), but the gateway itself keeps running — only CLI invocations are killed.

Note: openclaw plugins list still prints the plugin row as loaded despite the same error appearing in stderr, suggesting an internal inconsistency between load-failure reporting and the registry view.

OpenClaw version

2026.4.23 (a979721)

Operating system

Ubuntu 24.04 LTS (aarch64, Oracle Cloud)

Install method

npm global (npm i -g openclaw)

Model

anthropic/claude-opus-4-7 (irrelevant — bug is in CLI bootstrap)

Provider / routing chain

N/A — failure happens before any model call (during plugin registry load).

Additional provider/model setup details

The bundled plugin metadata reports a version mismatch worth flagging:

$ cat /home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/package.json
{
  "name": "@openclaw/amazon-bedrock-provider",
  "version": "2026.4.20",   ← shipped inside OpenClaw 2026.4.23
  ...
  "dependencies": {
    "@aws-sdk/client-bedrock": "3.1033.0",
    ...
  }
}

The bundled node_modules/@aws-sdk/client-bedrock/ directory contains only:

dist-types/
package.json

Whereas the upstream tarball on npm contains dist-cjs/, dist-es/, and dist-types/. This is consistent with the bundler dropping the runtime builds during plugin staging (stageRuntimeDependencies: true in openclaw.plugin.json), keeping only the typings tree.

Evidence

# 1. Confirm shipped contents
$ ls /home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/extensions/amazon-bedrock/node_modules/@aws-sdk/client-bedrock/
dist-types  package.json

# 2. The package.json points at a missing main
$ cat .../amazon-bedrock/node_modules/@aws-sdk/client-bedrock/package.json | grep -E '"name"|"version"|"main"'
  "name": "@aws-sdk/client-bedrock",
  "version": "3.1033.0",
  "main": "./dist-cjs/index.js",   ← does not exist on disk

# 3. The upstream tarball is fine
$ npm pack @aws-sdk/[email protected] -q && \
  tar tzf aws-sdk-client-bedrock-3.1033.0.tgz | grep -c "dist-cjs/"
71

# 4. Reproduce the abort
$ openclaw message send --channel telegram --target "-100..." --message "test"
[plugins] amazon-bedrock failed to load …
[openclaw] Failed to start CLI: PluginLoadFailureError: plugin load failed: amazon-bedrock …
$ echo $?
0

Real-world impact in this environment: boot-notify.sh (executed via openclaw-notify.service) ran twice on 2026-04-25 (15:10 and 15:23 CEST), reported success, but neither time delivered the ✅ Gateway arrancado y listo. Telegram message. The owner only noticed after asking. Captured /tmp/boot-notify.log shows the same PluginLoadFailureError stack between the "esperando a gateway / listo" lines and the "fin" line.

Related (but distinct) prior issues found in repo:

  • #63575 / PR #63586 — proposes filtering strict failures by plugins.allow (not merged at filing time).
  • #70371 / PR #70394 — proposes removing throwOnLoadError: true from validate paths (not merged at filing time). Both of those would alleviate the symptom (the throw), but they do not address the root cause here, which is that the bundler emits an incomplete @aws-sdk/client-bedrock package.

Additional information

Suggested fixes (not mutually exclusive):

  1. Bundler: ensure stageRuntimeDependencies for @openclaw/amazon-bedrock-provider includes dist-cjs/ and dist-es/ (currently only dist-types/ is staged for @aws-sdk/[email protected]).
  2. Loader: treat optional provider plugins (amazon-bedrock, etc.) as soft dependencies — log + skip on missing module instead of maybeThrowOnPluginLoadError aborting CLI bootstrap.
  3. Exit code: when CLI bootstrap aborts via PluginLoadFailureError, exit with non-zero so systemd/wrapper scripts can detect the failure rather than reporting success.

extent analysis

TL;DR

The most likely fix is to update the bundler configuration to include dist-cjs/ and dist-es/ for @aws-sdk/[email protected] in the @openclaw/amazon-bedrock-provider plugin.

Guidance

  • Verify that the stageRuntimeDependencies option in openclaw.plugin.json is set to include dist-cjs/ and dist-es/ for @aws-sdk/[email protected].
  • Consider treating optional provider plugins as soft dependencies to prevent CLI bootstrap abortion on missing modules.
  • Update the exit code to non-zero when CLI bootstrap aborts via PluginLoadFailureError to enable failure detection by systemd/wrapper scripts.
  • Check the package.json file of @aws-sdk/client-bedrock to ensure it has a valid "main" entry pointing to an existing file.

Example

No code snippet is provided as the issue is related to configuration and bundling.

Notes

The suggested fixes are not mutually exclusive, and a combination of them may be necessary to fully resolve the issue. The root cause is the incomplete bundling of @aws-sdk/[email protected], which is missing dist-cjs/ and dist-es/.

Recommendation

Apply the workaround by updating the bundler configuration to include the missing directories, and consider treating optional provider plugins as soft dependencies to prevent CLI bootstrap abortion.

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

CLI commands not related to Amazon Bedrock should succeed regardless of the state of the amazon-bedrock plugin. A missing optional provider plugin must not abort openclaw CLI invocations. Either:

  • the amazon-bedrock plugin should be bundled with a complete @aws-sdk/client-bedrock package (including dist-cjs/), or
  • a missing/incomplete optional provider plugin should degrade gracefully (skip + diagnostic) instead of throwing PluginLoadFailureError and exiting.

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]: amazon-bedrock plugin ships incomplete @aws-sdk/client-bedrock (missing dist-cjs/), aborting every CLI command [1 comments, 1 participants]