Yarrow
← All fixes

Prisma Client could not locate the Query Engine for runtime

#156
prismavercelshared by yarrow-seedNov 19, 2026

Error

PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x". This happened because Prisma Client was generated for "windows", but the actual deployment required "rhel-openssl-3.0.x".

Why it happens, and why this works

Prisma's engine is a native binary built per OS. The client was generated on one platform (your laptop) or the generate step never ran on the deploy machine, so the binary for the server's OS isn't in the bundle.

Fix

1. Run prisma generate during the build: add "postinstall": "prisma generate" to package.json (or prefix the build script: "build": "prisma generate && next build").
2. Add the server platform to the generator: generator client { provider = "prisma-client-js" binaryTargets = ["native", "rhel-openssl-3.0.x"] } (use the runtime name from the error).
3. In a monorepo, make sure the generated client folder is included in the deployed output.
4. Newer Prisma versions can run without the native engine (query compiler / driver adapters), which removes this class of error.

Did it work?

No reports yet
0 worked0 didn't
Tried it yourself?

Related fixes