P
Prisma4mo ago
Ramparts

Problem with prisma-client generator on vercel with a monorepo

Speaking to you guys on twitter. i hvae been using the monorepo-plugin, and wanted to move away from it. The first step was to move to the new generator, which works perfectly locally, but is still throwing up errors on vercel due to it not locating 'Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x".'
No description
8 Replies
Prisma AI Help
Prisma AI Help4mo ago
You selected the carefully hand-crafted route. A dev artisan will respond soon. Meanwhile, the #ask-ai channel awaits if you're curious!
Ramparts
RampartsOP4mo ago
generator client {
provider = "prisma-client"
output = "./client"
importFileExtension = ""
binaryTargets = ["native", "linux-arm64-openssl-1.0.x", "linux-arm64-openssl-3.0.x"]
}
generator client {
provider = "prisma-client"
output = "./client"
importFileExtension = ""
binaryTargets = ["native", "linux-arm64-openssl-1.0.x", "linux-arm64-openssl-3.0.x"]
}
No description
Ramparts
RampartsOP4mo ago
database is in a package, "packages/database" loaded in my app
import { PrismaClient } from "@company/database";

function createPrisma() {
return new PrismaClient();
}

const globalForPrisma = global as unknown as {
prisma: ReturnType<typeof createPrisma>;
};

export const prisma = globalForPrisma.prisma ?? createPrisma();

if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;

export default prisma;
import { PrismaClient } from "@company/database";

function createPrisma() {
return new PrismaClient();
}

const globalForPrisma = global as unknown as {
prisma: ReturnType<typeof createPrisma>;
};

export const prisma = globalForPrisma.prisma ?? createPrisma();

if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;

export default prisma;
following command is run as part of build
prisma generate --no-hints
prisma generate --no-hints
Marc Hess
Marc Hess4mo ago
Hey Ramparts, thanks for making a thread. Let me catch up to speed. Also @Nurul is our main support in discord so he may be able to help if i cant. Also just pining @Aidan McAlister for another set of eyes. I think some others have had this issue as well, let me ask the team and get back to you
Ramparts
RampartsOP4mo ago
yeah, found similar on github, last night after posting: https://github.com/prisma/prisma/discussions/19498#discussioncomment-12976746
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&#39;d appr...
Ramparts
RampartsOP4mo ago
obviously not copying the native env files over at the same time. I did try the new rust based one, but I have other issues to fix with that first
Nurul
Nurul4mo ago
Hey @Ramparts! Can you try out this suggestion and check if that resolves the issue for you? https://github.com/prisma/prisma/issues/26966#issuecomment-2827699500
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 = &quot;prisma-client-js&quot; seed = &quot;prisma/seed.ts&quot; output = &quot;../src/gen...
Ramparts
RampartsOP4mo ago
Hello, so the whole point of the change i was trying to make was to REMOVE the monorepo-plugin I already have a successful prod build using the prisma-client-js generator, plus the plugin, but I was that i'd be able to remove the plugin moving to the prisma-client generator did you see this reply @Nurul (Prisma)

Did you find this page helpful?