mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-05 08:23:17 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
73d3d151ab
commit
90850bf6d5
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user