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 generate did 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.
  • prisma is only a dev dependency, so the build logs prisma: command not found.
  • A monorepo build omitted the engine file. Prisma names libquery_engine-rhel-openssl-3.0.x.so.node as the example.
  • The project still expects the Rust engine on a serverless function.

How to fix it, step by step

  1. Add a postinstall script of prisma generate so every Vercel install regenerates the client. Prisma's deploy guide shows that script.
  2. If the log says prisma: command not found, move the prisma package from devDependencies to dependencies and redeploy.
  3. 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.
  4. On a monorepo that must keep the Rust engine, Prisma documents @prisma/nextjs-monorepo-workaround-plugin so the engine file stays in the bundle.
  5. Give Preview its own DATABASE_URL if 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 generate finishing, without "command not found."
  • A page that reads the database returns rows instead of an engine error.

Sources

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.

Request a fix