Skip to content

Commit 418efad

Browse files
authored
Fix: add node-gpy to fix arm64 builds (#1616)
## Summary - Add `node-gyp` to `apk add` in `ui/Dockerfile` and `python/Dockerfile` — npm 11 on arm64 Wolfi no longer bundles it, causing `npm ci`/`npm install` to fail with `Cannot find module 'node-gyp/bin/node-gyp.js'` ## Root cause `ui/Dockerfile` uses `FROM --platform=$BUILDPLATFORM`, so the deps stage runs natively on the build host. On Apple Silicon (arm64), Wolfi's `nodejs~24` ships with npm 11, which no longer bundles `node-gyp` but still requires it internally. This only affects arm64 builds — GitHub CI runs on amd64 where the Wolfi nodejs package ships with npm 10. ## Testing Deployed via `make helm-install` on Apple Silicon and verified that e2e tests pass. Signed-off-by: Jeremy Alvis <jeremy.alvis@solo.io>
1 parent fcad888 commit 418efad

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

python/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ RUN addgroup -g 1001 pythongroup && \
6262
# Install anthropic sandbox runtime and dependencies
6363
RUN --mount=type=cache,target=/var/cache/apk,rw \
6464
apk add \
65-
nodejs npm bubblewrap socat ripgrep
65+
nodejs npm node-gyp bubblewrap socat ripgrep
6666

6767
# Install sandbox runtime from a specific commit of the GitHub repo without using global prefix
6868
# This avoids scope-related rename issues in global node_modules

ui/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ARG BUILDPLATFORM
1010
ARG TOOLS_NODE_VERSION
1111

1212
RUN echo "Installing on $BUILDPLATFORM" \
13-
&& apk add --no-cache curl bash openssl unzip ca-certificates nginx supervisor "nodejs~${TOOLS_NODE_VERSION}" npm \
13+
&& apk add --no-cache curl bash openssl unzip ca-certificates nginx supervisor "nodejs~${TOOLS_NODE_VERSION}" npm node-gyp \
1414
&& update-ca-certificates
1515

1616
ENV DO_NOT_TRACK=1

0 commit comments

Comments
 (0)