PrismaP
Prisma11mo ago
5 replies
Peform

vercel Prisma Client could not locate the Query Engine

Hey,

I'm currently trying to deploy the development version of my website on vercel and I have started getting this error after updating to version 6.4.1 (previously was on 5.4).
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 "../../node_modules/.pnpm/@prisma+client@6.4.1_prisma@6.4.1_typescript@5.7.3__typescript@5.7.3/node_modules/.prisma/client".

We would appreciate if you could take the time to share some information with us.
Please help us by answering a few questions: https://pris.ly/engine-not-found-bundler-investigation

The following locations have been searched:
  /var/task/node_modules/.pnpm/@prisma+client@6.4.1_prisma@6.4.1_typescript@5.7.3__typescript@5.7.3/node_modules/.prisma/client
  /var/task/apps/dashboard/.next/server
  /vercel/path0/node_modules/.pnpm/@prisma+client@6.4.1_prisma@6.4.1_typescript@5.7.3__typescript@5.7.3/node_modules/@prisma/client
  /var/task/apps/dashboard/.prisma/client
  /tmp/prisma-engines

I have read the guide linked in the error, but I am a little confused about some of the implementation for some of the "fixes".

I have already implemented a globalForPrisma variable, only difference is I am using prisma in a monorepo, so I have a package called "database", which allows me to reuse my schema across all apps.

This is not a build error, this is a runtime error and the prisma client is generated at build time using a npm script: "build": "pnpm run db:generate & tsup" as suggested in the guide above (at build time it is having no issues finding prisma schema)
Was this page helpful?