Prisma: Query engine library for current platform does not exist
PrismaClientInitializationError: Query engine library for current platform 'debian-openssl-3.0.x' does not exist at /app/node_modules/.prisma/client/libquery_engine.so.node
Immediate Remediation
prisma
// prisma/schema.prisma - Add binaryTargets for local OS and deployment container:
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "debian-openssl-3.0.x", "rhel-openssl-3.0.x"]
}
# Regenerate Prisma Client binary artifacts:
pnpm prisma generateRoot Cause Analysis
Prisma generates native binaries specific to the OS that ran prisma generate. When deployed into Docker or Alpine/Debian Linux, the host binary fails to link.
Verification & Guardrails
- In Docker multi-stage builds, always run pnpm prisma generate inside the target container environment.
- For Alpine containers, add "linux-musl-openssl-3.0.x" to binaryTargets.
Have a custom or uncategorized crash?
Run your trace through our in-memory client privacy sandbox for instant SRE remediation.