From 94c35b32f07cce0fb526878390ee09301e5d3751 Mon Sep 17 00:00:00 2001 From: Pavlo Strunkin Date: Tue, 21 Jan 2025 12:49:29 +0200 Subject: [PATCH] fix PrismaClientInitializationError api-1 | PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime "linux-arm64-openssl-3.0.x". api-1 | api-1 | This happened because Prisma Client was generated for "linux-arm64-openssl-1.1.x", but the actual deployment required "linux-arm64-openssl-3.0.x". api-1 | Add "linux-arm64-openssl-3.0.x" to `binaryTargets` in the "schema.prisma" file and run `prisma generate` after saving it: api-1 | api-1 | generator client { api-1 | provider = "prisma-client-js" api-1 | binaryTargets = ["native", "debian-openssl-3.0.x", "linux-arm64-openssl-3.0.x"] api-1 | } --- Dockerfile | 1 + prisma/Dockerfile | 1 + prisma/schema.prisma | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0f72f9c..40ee2c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ COPY ./prisma/schema.prisma ./ COPY package*.json ./ # Install app dependencies +ENV NODE_TLS_REJECT_UNAUTHORIZED='0' RUN npm ci --verbose COPY tsconfig*.json ./ diff --git a/prisma/Dockerfile b/prisma/Dockerfile index e25ed49..811c443 100644 --- a/prisma/Dockerfile +++ b/prisma/Dockerfile @@ -6,6 +6,7 @@ WORKDIR /app COPY . . +ENV NODE_TLS_REJECT_UNAUTHORIZED='0' RUN npm ci --verbose RUN chmod +x /app/wait-for-it.sh diff --git a/prisma/schema.prisma b/prisma/schema.prisma index a1000cf..014ea95 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -1,6 +1,6 @@ generator client { provider = "prisma-client-js" - binaryTargets = ["native", "debian-openssl-3.0.x"] + binaryTargets = ["native", "debian-openssl-3.0.x", "linux-arm64-openssl-3.0.x"] } datasource db {