Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x"
Hello. I have been using Prisma for years and love it. However, I am having an issue with a new project when deploying to vercel. It's seems this is a fairly common issue, as there is an entire github post about it here:https://github.com/prisma/prisma/discussions/19498. In the last two weeks, it seems 3-4 other people have had the same issue, yet none of these have been responded to. I was wondering if there is a known solution/if this is currently being worked on?
6 Replies
You chose to compile with the bot. One moment while I piece together your answer…
Yes, this is a known issue with Prisma when deploying to serverless environments like Vercel. The error occurs because Prisma can't find the correct Query Engine binary for the runtime environment.
This happens for several reasons:
1. Your client was generated on one platform but runs on a different one at runtime
2. The bundler/framework didn't properly copy the necessary engine files
3. The binary targets in your schema.prisma file might be incorrect
Based on the knowledge sources, there are a few solutions you can try:
1. Add the correct binary target to your schema.prisma file:
2. For Vercel specifically, you might need to use a plugin like
@prisma/nextjs-monorepo-workaround-plugin
if you're using a monorepo setup Can't find prisma binary on vercel serverless function.
3. Make sure you're using a compatible Node.js version. As noted in one issue, Node 20 on Vercel requires OpenSSL 3.0.x, while Node 18 and older use OpenSSL 1.0.x Netlify deployment with Node 20 break Prisma.
4. Ensure you're using the latest version of Prisma, as fixes for these issues are regularly released.
5. If you're using a custom setup with pkcs12 certificates, make sure they're using the correct algorithm (AES-256-CBC for OpenSSL 3) Prisma Client QE openssl-3.0.x errors.
The Prisma team is aware of these issues and has been working on improving error messages and detection. If you continue to have problems, creating a new issue with your specific setup details would be helpful.
🤔 Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly.
In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.I tried all these, but still no luck.
For whoever comes in to look at this. I have a vercel business account that has a project working with no issue at all. I literally copy-pasted that project into my personal vercel account, and now I am getting this error
Hmm, now it seems like the app that was working earlier this week no longer works
Ok went back to using prisma-client-js for now until this is solved
i have the same problem. adding the binaries options did not do anything. i opened an issue https://github.com/prisma/prisma/issues/26966
GitHub
prisma 6.6.0 on vercel - could not locate the Query Engine for runt...
prisma 6.6.0 works on my local machine. my schema.prisma has a defined output: generator client { provider = "prisma-client-js" seed = "prisma/seed.ts" output = "../src/gen...
ok so i added the workaround plugin and it worked
GitHub
User questions: Engine not found (tooling) · prisma prisma · Disc...
Hi, you have been directed to this issue because we want to learn more about your project setup. Thanks to your answers, we will be able to make better design decisions in the future. We'd appr...
I'll try this next ty