Skip to content

Docker: Discord/WhatsApp channels broken — missing dist/plugins/runtime/index.js #48422

@arvindcr4

Description

@arvindcr4

Summary

Docker builds of OpenClaw v2026.3.14 fail to start Discord and WhatsApp channels due to a missing dist/plugins/runtime/index.js file. The deferred channel startup feature introduced in 1b234b9 triggers resolvePluginRuntimeModulePath() (src/plugins/loader.ts:885), which expects this file to exist — but tsdown never generates it.

Error

[gateway/channels] channel startup failed: Error: Unable to resolve plugin runtime module
[health] initial refresh failed: Unable to resolve plugin runtime module

Telegram is unaffected (bypasses the deferred plugin path).

Root Cause

resolvePluginRuntimeModulePath() (loader.ts:228) builds candidate paths:

  • <packageRoot>/src/plugins/runtime/index.ts — not present in Docker (only dist/ is copied)
  • <packageRoot>/dist/plugins/runtime/index.js — never generated by tsdown

The plugins/runtime module is not listed as a tsdown entry in scripts/lib/plugin-sdk-entrypoints.json or tsdown.config.ts, so the bundler never produces a standalone dist/plugins/runtime/index.js.

The new stageBundledPluginRuntime script (09df232) creates dist-runtime/ for local dev, but this directory is not copied into the Docker image.

Reproduction

git checkout 546e4d940  # latest main
docker build --build-arg OPENCLAW_INSTALL_CODING_CLIS=1 -t openclaw:local .
# configure discord + whatsapp channels in openclaw.json
docker compose up -d openclaw-gateway
docker logs openclaw-openclaw-gateway-1 | grep "channel startup failed"
# → Error: Unable to resolve plugin runtime module

Workaround Attempted

  • OPENCLAW_BUNDLED_PLUGINS_DIR=/app/dist/extensions — helps resolveBundledPluginsDir() but does not fix resolvePluginRuntimeModulePath()
  • Copying src/plugins/runtime/ into the image — fails because the .ts files have relative imports to ../../agents/model-auth.js etc. which don't exist in Docker

Suggested Fix

Either:

  1. Add plugins/runtime as a tsdown entry (in tsdown.config.ts core entries) so dist/plugins/runtime/index.js is generated during build
  2. Or update the Dockerfile to copy dist-runtime/ and adjust resolvePluginRuntimeModulePath() to check that path

Environment

  • OpenClaw v2026.3.14 (commit 546e4d9)
  • Docker build on Linux (Fedora 43)
  • Node 24.14.0 inside container

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions