From 1af0e6842eb62e2554f8675af0a9823ca93664fe Mon Sep 17 00:00:00 2001 From: IliesAllali Date: Mon, 26 Oct 2026 14:03:06 +0100 Subject: [PATCH] =?UTF-8?q?D=C3=A9ploiement=20:=20le=20contr=C3=B4le=20des?= =?UTF-8?q?=20d=C3=A9pendances=20backend=20ne=20charge=20plus=20@prisma/cl?= =?UTF-8?q?ient,=20qui=20n'existe=20qu'apr=C3=A8s=20generate=20depuis=20Pr?= =?UTF-8?q?isma=207?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- deploy/deploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/deploy.sh b/deploy/deploy.sh index 91df2f7..caa72ea 100644 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -137,7 +137,8 @@ if changed backend ecosystem.config.cjs; then node -e "const [a, b] = process.versions.node.split('.').map(Number); process.exit((a === 20 && b >= 19) || (a === 22 && b >= 12) || a >= 24 ? 0 : 1)" \ || { echo "ERROR: Node $(node -v) trop ancien pour Prisma 7 (^20.19, ^22.12 ou 24+)"; exit 1; } install_deps backend - (cd "$REPO_DIR/backend" && node -e "require('fastify'); require('zod'); require('@prisma/client')") \ + # Le client Prisma n'existe qu'après prisma:generate (src/generated) : on vérifie ses dépendances, pas le client + (cd "$REPO_DIR/backend" && node -e "require('fastify'); require('zod'); require('@prisma/adapter-pg'); require.resolve('@prisma/client/runtime/client')") \ || { echo "ERROR: dépendances backend manquantes après installation"; exit 1; } log "Build backend" (cd "$REPO_DIR/backend" && NODE_ENV='' npm run prisma:generate && NODE_ENV='' npm run build)