Could not locate the Query Engine for runtime "rhel-openssl-3.0.x"

I’ve tried solving this for days now and please need your expertise.

My codebase is a turborepo monorepo with web apps under /apps/… and database packages used by those apps under /packages/… (pretty standard)

The generator client code in the /packages/db1/prisma/schema.prisma is:

generator client {
provider = “prisma-client-js”
output = “../generated/client”
binaryTargets = [“native”, “rhel-openssl-3.0.x”]
}

Everything installs and builds correctly on my local, however on Vercel I keep getting this error with any db operation:

Unhandled Rejection: Error [PrismaClientInitializationError]: Prisma Client could not locate the Query Engine for runtime “rhel-openssl-3.0.x”.

We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs.

This is likely caused by a bundler that has not copied “libquery_engine-rhel-openssl-3.0.x.so.node” next to the resulting bundle.
Ensure that “libquery_engine-rhel-openssl-3.0.x.so.node” has been copied next to the bundle or in “generated/client”.

We would appreciate if you could take the time to share some information with us.
Please help us by answering a few questions: User questions: Engine not found (bundler) · prisma/prisma · Discussion #19499 · GitHub

The following locations have been searched:
/var/task/apps/web/generated/client
/var/task/apps/web/.next/server
/home/alex/Desktop/PROJECTS2025/Feb7/packages/webdb/generated/client
/var/task/apps/web/.prisma/client
/tmp/prisma-engines
at ml (.next/server/chunks/8555.js:64:756)
at async Object.loadLibrary (.next/server/chunks/8555.js:111:9365)
at async Bt.loadEngine (.next/server/chunks/8555.js:112:448)
at async Bt.instantiateLibrary (.next/server/chunks/8555.js:111:13348) {
clientVersion: ‘6.5.0’,
errorCode: undefined,
retryable: undefined
}
Node.js process exited with exit status: 128

Hi @firebrand1, welcome to the Vercel Community!

Sorry that you’re facing this issue. Have you already tried the solutions suggested in the linked discussions/docs of the mentioned error?

Thanks for the prompt reply! Yeah, actually Gemini2.5 ended up solving it :expressionless:

Needed to use a package called “nextjs-monorepo-workaround-plugin” (https://www.npmjs.com/package/@prisma/nextjs-monorepo-workaround-plugin)

Honestly though, this feels like something Vercel should address at its core

Cheers