From 54d9fb5e63f4b00cc941153eccff73bca673cd32 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Nov 2025 18:22:24 +0000 Subject: [PATCH] Fix Prisma client permission errors by cleaning old client before regeneration - Remove /app/node_modules/.prisma/client before generating - Prevents EACCES errors when Prisma tries to unlink existing files - Cleanup runs as root before switching to nextjs user --- docker/web/entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/web/entrypoint.sh b/docker/web/entrypoint.sh index c30f6bc1..2d2787db 100755 --- a/docker/web/entrypoint.sh +++ b/docker/web/entrypoint.sh @@ -14,6 +14,10 @@ chown -R nextjs:nodejs "$DB_DIR" # Ensure node_modules is owned by nextjs user for Prisma client generation chown -R nextjs:nodejs /app/node_modules +# Remove old Prisma client to avoid permission issues during regeneration +echo "Cleaning old Prisma client..." +rm -rf /app/node_modules/.prisma/client + # Switch to nextjs user and initialize database if needed gosu nextjs sh -c ' DB_PATH="'"$DB_PATH"'"