Skip to content

Commit 82b0029

Browse files
stubbiclaude
authored andcommitted
fix: keep tsx in Docker image — needed as Node ESM loader at runtime
tsx is listed in devDependencies but is required at runtime because the server CMD uses --import tsx/dist/loader.mjs. The prod-only reinstall was stripping it out, causing CrashLoopBackOff. Removed the prod prune step — image size is controlled by the selective COPY in the production stage instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6a26e9e commit 82b0029

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ COPY . .
4747
RUN pnpm -r build \
4848
&& test -f server/dist/index.js || (echo "ERROR: server build output missing" && exit 1)
4949

50-
# Re-install with prod-only deps for a clean node_modules
51-
RUN rm -rf node_modules */node_modules packages/*/node_modules packages/adapters/*/node_modules packages/plugins/*/node_modules packages/plugins/examples/*/node_modules \
52-
&& pnpm install --frozen-lockfile --prod --ignore-scripts
50+
# Note: no prod prune — tsx is in devDependencies but needed at runtime
51+
# as the Node ESM loader. Image size is controlled by selective COPY below.
5352

5453
# ── Stage 4: production ───────────────────────────────────────
5554
# Distroless-style minimal image. No shell, no package manager,

0 commit comments

Comments
 (0)