Skip to content

Commit 0190103

Browse files
author
bgagent
committed
fix(agent): re-run install.cjs after npm update in Dockerfile
Claude Code 2.1.x ships native binaries via postinstall. The npm update step that patches transitive deps overwrites bin/claude.exe back to the fallback stub, causing 'Exec format error' at runtime. Re-run install.cjs to restore the native binary after the update.
1 parent 22705e8 commit 0190103

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

agent/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - && \
5555
RUN npm install -g npm@latest && \
5656
npm install -g @anthropic-ai/claude-code@2.1.191 && \
5757
CLAUDE_NPM_ROOT="$(npm root -g)/@anthropic-ai/claude-code" && \
58-
npm --prefix "${CLAUDE_NPM_ROOT}" update tar minimatch glob cross-spawn picomatch
58+
npm --prefix "${CLAUDE_NPM_ROOT}" update tar minimatch glob cross-spawn picomatch && \
59+
node "${CLAUDE_NPM_ROOT}/install.cjs"
5960

6061
# Install uv (fast Python package manager) — pinned for reproducibility
6162
COPY --from=ghcr.io/astral-sh/uv:0.11.14 /uv /usr/local/bin/uv

0 commit comments

Comments
 (0)