From 90850bf6d55864dfe2ea4e6d4b43c41480f33f99 Mon Sep 17 00:00:00 2001 From: Dmitriy Alergant <93501479+DmitriyAlergant@users.noreply.github.com> Date: Sat, 22 Nov 2025 22:27:06 -0500 Subject: [PATCH] fix: add nodejs and npm to runtime dependencies for prisma generate (#16903) Fixes cross-platform Docker build issue where `prisma generate` fails when building for amd64 platform from macOS. The Prisma CLI requires Node.js and npm to be available in the runtime environment. The Python prisma package (v0.11.0) uses nodeenv to bootstrap Node.js if not found. However, the downloaded npm v10 fails with a "sizeCalculation" error in minimal Chainguard environments during cross-platform builds. Providing system nodejs/npm resolves this. Changes: - Added nodejs and npm to runtime dependencies (Dockerfile:51) - This enables prisma generate to run successfully during the build Error without fix: npm error cannot set sizeCalculation without setting maxSize or maxEntrySize subprocess.CalledProcessError: Command '[...nodeenv/bin/npm', 'install', 'prisma@5.4.2']' returned non-zero exit status 1. Testing: docker buildx build --platform linux/amd64 -t litellm:test . Co-authored-by: Claude --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d9ea0d9a47..f75706805e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,7 +48,7 @@ FROM $LITELLM_RUNTIME_IMAGE AS runtime USER root # Install runtime dependencies -RUN apk add --no-cache openssl tzdata +RUN apk add --no-cache openssl tzdata nodejs npm # Upgrade pip to fix CVE-2025-8869 RUN pip install --upgrade pip>=24.3.1