Prisma on Vercel: query engine not found
Vercel runs the app and Prisma can't find its query engine? The Rust engine file was left out of the serverless bundle, or Prisma Client was generated for the wrong machine.
Reviewed October 14, 2026
What it means in plain English
Prisma Client talks to the database through an engine. The older engine is a Rust file built for a specific operating system. Your laptop's file is not the one Vercel runs. Prisma's Vercel guide says deploys can ship without libquery_engine-rhel-openssl-3.0.x.so.node, especially in a monorepo, because the serverless bundle drops the file. The app then crashes when it tries to query.
Likely causes
prisma generatedid not run on Vercel, so the deployment has a client built somewhere else. Vercel caches dependencies, and a schema change can leave that cache stale.prismais only a dev dependency, so the build logsprisma: command not found.- A monorepo build omitted the engine file. Prisma names
libquery_engine-rhel-openssl-3.0.x.so.nodeas the example. - The project still expects the Rust engine on a serverless function.
How to fix it, step by step
- Add a
postinstallscript ofprisma generateso every Vercel install regenerates the client. Prisma's deploy guide shows that script. - If the log says
prisma: command not found, move theprismapackage from devDependencies to dependencies and redeploy. - If the missing file is the Rust query engine, Prisma's current Vercel guide says you can stop shipping that binary. Set
engineType = "client"on the generator (generally available since Prisma ORM 6.16.0) and use a driver adapter such as@prisma/adapter-pg. No Rust engine is downloaded. This also makes the monorepo workaround plugin unnecessary. - On a monorepo that must keep the Rust engine, Prisma documents
@prisma/nextjs-monorepo-workaround-pluginso the engine file stays in the bundle. - Give Preview its own
DATABASE_URLif pull requests run migrations. The guide says a single production URL means a preview migration can change the production database.
How to check it worked
- The deployment log shows
prisma generatefinishing, without "command not found." - A page that reads the database returns rows instead of an engine error.
Sources
Related fixes
Can't fix it? Get help.
If the steps didn't clear the error, send what the screen says. A person can take a look. This is a request for a paid fix, not an instant chat.