From 5fd375ac6a4dcc267bf2032af1bf2481deca7b0a Mon Sep 17 00:00:00 2001 From: David Orban Date: Fri, 20 Mar 2026 13:05:42 +0100 Subject: [PATCH] fix: install prisma in runner stage to fix prisma generate prisma and @prisma/client are listed as devDependencies, but the runner stage uses `npm ci --omit=dev` which skips them. The subsequent `RUN node_modules/.bin/prisma generate` then fails with: /bin/sh: node_modules/.bin/prisma: not found Fix: append `&& npm install --no-save prisma @prisma/client` so the binaries are available in the runner stage without adding them to production dependencies permanently. Co-Authored-By: Oz --- docker/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7770177..5b0dc6e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -22,10 +22,12 @@ WORKDIR /app RUN apk add --no-cache python3 make g++ RUN addgroup -S appgroup && adduser -S appuser -G appgroup -# Install production deps (includes prisma + better-sqlite3, rebuilt for this image) +# Install production deps (includes better-sqlite3, rebuilt for this image) +# prisma and @prisma/client are devDependencies but are required at runtime +# for the runner stage to generate the Prisma client. COPY package*.json ./ COPY prisma ./prisma -RUN npm ci --omit=dev +RUN npm ci --omit=dev && npm install --no-save prisma @prisma/client # Re-generate Prisma client in runner stage RUN node_modules/.bin/prisma generate