From e200215bb510def8f189a28dea1e75e507db24ed Mon Sep 17 00:00:00 2001 From: Wiktoria Van Harneveldt Date: Sun, 23 Aug 2026 21:38:54 +0200 Subject: [PATCH] Fix Prisma client module resolution in production Docker builds. Prisma generate ran before tsconfig.json was available in the Docker build, so the client was emitted with .ts import paths that Node cannot resolve at runtime. Co-authored-by: Cursor --- Dockerfile | 1 + prisma/schema.prisma | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2c11a21..0bab682 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,6 +41,7 @@ FROM deps-dev AS build # when only application source code changes. COPY prisma ./prisma COPY prisma.config.ts ./ +COPY tsconfig.json ./ COPY src/loadEnvFile.ts ./src/loadEnvFile.ts ENV DATABASE_URL="file:/tmp/build.db" diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 559da2f..fb2acfa 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -1,6 +1,7 @@ generator client { - provider = "prisma-client" - output = "../src/generated/prisma" + provider = "prisma-client" + output = "../src/generated/prisma" + importFileExtension = "js" } datasource db {