GUIDES · PRISMA / DATABASE
Prisma on Vercel: client not generated and query engine not found
The two Prisma errors that only show up on Vercel. Why the generated client is missing, how postinstall fixes it, and what to do when the query engine binary is not found at runtime.
Module not found: @prisma/client has not been generated
The generated client lives in node_modules/.prisma and is never committed. Locally it exists because you ran prisma generate at some point. On Vercel nothing runs it unless you ask, and the install step caches node_modules between builds, so a stale client survives too.
{
"scripts": {
"postinstall": "prisma generate",
"build": "prisma generate && next build"
}
}Query engine for runtime rhel-openssl-3.0.x could not be located
Vercel Functions run on a Linux image the client must have a binary for. Set binaryTargets in the generator block so the right engine is generated, or move to the driver adapters so there is no native engine to ship. With Next.js output tracing, make sure the engine file is included in the function bundle.
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-3.0.x"]
}Connection limits on serverless
Every function instance opens its own connection. Use a pooler such as Prisma Accelerate, PgBouncer or your database provider's pooled connection string for DATABASE_URL, and keep a direct URL for migrations.
Updated 2026-10-05