-
-
Notifications
You must be signed in to change notification settings - Fork 69.2k
Discord (and other extensions) broken in Docker after send-deps extraction in #46301 #46443
Description
Summary
PR #46301 ("Fix configure startup stalls from outbound send-deps imports") extracted resolveOutboundSendDep from src/infra/outbound/deliver.ts into a new file src/infra/outbound/send-deps.ts, and updated extension imports accordingly. This breaks all affected extensions (Discord, Telegram, WhatsApp, Slack, Signal, iMessage, Matrix, MSTeams) when running in Docker.
Root Cause
Extensions use relative imports like:
import { resolveOutboundSendDep } from "../../../src/infra/outbound/send-deps.js";This resolves to /app/src/infra/outbound/send-deps.js at runtime. In the Docker image, /app/src/ does not exist — it is stripped during the multi-stage build. Only /app/dist/ is copied into the final image.
The old import path (../../../src/infra/outbound/deliver.js) worked because deliver.ts was already part of the plugin-sdk build output. The new send-deps.ts was never registered as a plugin-sdk subpath entry, so the bundler does not emit it to the expected location.
The bundled version exists as a hashed file (e.g. /app/dist/outbound-send-deps-BFSj2ZTz.js), but nothing maps it to the path extensions expect.
Reproduction
docker build --build-arg OPENCLAW_INSTALL_BROWSER=1 -t openclaw:local .
docker run -d --name oc-local openclaw:local
docker exec oc-local ls /app/src/infra/outbound/
# -> directory does not exist
docker exec oc-local ls /app/dist/plugin-sdk/src/infra/outbound/
# -> empty directoryDiscord extension fails to load with:
Error: Cannot find module '/app/src/infra/outbound/send-deps.js'
Affected Files (from #46301)
extensions/discord/src/outbound-adapter.tsextensions/telegram/src/outbound-adapter.tsextensions/telegram/src/channel.tsextensions/whatsapp/src/outbound-adapter.tsextensions/discord/src/channel.tsextensions/imessage/src/channel.tsextensions/matrix/src/outbound.tsextensions/msteams/src/outbound.tsextensions/signal/src/channel.tsextensions/slack/src/channel.ts
Suggested Fix
Same pattern as other plugin-sdk subpaths:
- Create
src/plugin-sdk/outbound-send-deps.tsthat re-exports from../infra/outbound/send-deps.js - Add
"outbound-send-deps"topluginSdkEntrypointsintsdown.config.ts - Update extension imports to use the plugin-sdk subpath instead of relative
../../../src/paths
Related
This is the same class of bug as #33266 (Matrix plugin fails in Docker due to missing keyed-async-queue subpath).
Environment
- Commit: d9c285e (latest main as of 2026-03-14)
- Platform: Docker on macOS (Apple Silicon)
- Build:
docker build --build-arg OPENCLAW_INSTALL_BROWSER=1 -t openclaw:local .
Workaround
Check out a commit prior to #46301 (e.g. d4ab73174 from 2026-03-07) and rebuild the Docker image.