Replies: 61 comments 58 replies
|
(Notes from another report of this #19564 (comment)) |
|
Have you tried to copy the engine in the suggested location? Did that work? Yes. I'm using AWS Lambda and Prisma does not search the Lambda task root, and none of the paths Prisma searches are available to copy files. Which package manager are you using? npm@9.6.3 Is your workspace a monorepo setup? No, it's pretty standard https://arc.codes repo Is a bundler in use? If yes, which one? esbuild via architect/plugin-typescript Is a framework in use? If yes, which one? Yes, https://arc.codes Your project uses TypeScript or just JavaScript? TypeScript When you saw our message, did it happen locally or in deployment? After deployment, in the Lambda execution environment Where is your project deployed? AWS Lambda |
Have you tried to copy the engine in the suggested location? Did that work?Our error message suggested you to copy the engine somewhere. How did that go? Which package manager are you using?For instance npm, pnpm, or yarn. Please attach the version if you know it. I prefer use the pnpm. But recently i found many lib not support the pnpm. I had to rollback my project. It's suck. Is your workspace a monorepo setup?Is your setup hosting multiple packages in a single workspace? Is a bundler in use? If yes, which one?Are you using webpack, swc, esbuild, rollup, or any other bundler? Is a framework in use? If yes, which one?Are you using Next.js, Next, or any other framework? Your project uses TypeScript or just JavaScript?Do you prefer using TypeScript or JavaScript within your project, or both? perfer using TypeScript. When you saw our message, did it happen locally or in deployment?The message was "Please help us by answering a few questions". On my local environment. I try to use the pkg build a single execute file. Where is your project deployed?Are you deploying to Vercel, Netlify, Lambda, or something else? I still in the develop this project. I will deploy on the factory window PC. So I had to build a single executable file. Finally. Can you support me on the pkg build Prisma project issue? |
|
Have you tried to copy the engine in the suggested location? Did that work? Which package manager are you using? Is your workspace a monorepo setup? Is a bundler in use? If yes, which one? Is a framework in use? If yes, which one? Your project uses TypeScript or just JavaScript? When you saw our message, did it happen locally or in deployment? Where is your project deployed? |
Have you tried to copy the engine in the suggested location? Did that work?Trying to avoid that right now, as this is only happening in production/deployment. Will update here if/when we try that. Which package manager are you using?yarn v1.22.19 Is your workspace a monorepo setup?Yes, however hoisting for prisma has already been disabled due to past issues. Is a framework in use? If yes, which one?Next.js 13 Your project uses TypeScript or just JavaScript?TypeScript When you saw our message, did it happen locally or in deployment?Deployment Where is your project deployed?AWS ECR |
Have you tried to copy the engine in the suggested location? Did that work?Worked perfectly, but of course, the bundler should just get it right. Which package manager are you using?Used yarn, but tried with npm, too Is your workspace a monorepo setup?Single workspace here Is a bundler in use? If yes, which one?Using Is a framework in use? If yes, which one?No framework Your project uses TypeScript or just JavaScript?TypeScript When you saw our message, did it happen locally or in deployment?The message was "Please help us by answering a few questions". Happened locally during setting up a fresh project on a Windows machine Where is your project deployed?Are you deploying to Vercel, Netlify, Lambda, or something else? No deployment yet |
|
Here is an issue that triggers a link to this discussion: #22142 |
Have you tried to copy the engine in the suggested location? Did that work?Copied (rhel-openssl-3.0.x) and existing in lamda zip, but still not working Which package manager are you using?pnpm@8.12.0 Is your workspace a monorepo setup?Yes Is a bundler in use? If yes, which one?webpack Is a framework in use? If yes, which one?nestjs 10 Your project uses TypeScript or just JavaScript?TypeScript When you saw our message, did it happen locally or in deployment?deployment Where is your project deployed?AWS Lamda |
|
Have you tried to copy the engine in the suggested location? Did that work? Which package manager are you using? Is your workspace a monorepo setup? Is a bundler in use? If yes, which one? Is a framework in use? If yes, which one? Your project uses TypeScript or just JavaScript? When you saw our message, did it happen locally or in deployment? Where is your project deployed? Note: |
|
Have you tried to copy the engine in the suggested location? Did that work? Which package manager are you using? Is your workspace a monorepo setup? Is a bundler in use? If yes, which one? Is a framework in use? If yes, which one? Your project uses TypeScript or just JavaScript? When you saw our message, did it happen locally or in deployment? Where is your project deployed? |
|
I don't know but if this is a solution but using turborepo with pnpm workspaces, I added a script to the prisma package, and in the root directory I ran the following pnpm --filter @workspace/prisma prisma:reset
pnpm --filter @workspace/prisma prisma:migrate-devThis is from the "scripts": {
"build": "prisma generate",
"format": "prisma format",
"post-install": "prisma generate",
"prisma:generate": "prisma generate",
"prisma:migrate-dev": "prisma migrate dev",
"prisma:migrate-deploy": "prisma migrate deploy",
"prisma:seed": "prisma db seed",
"prisma:studio": "prisma studio",
"prisma:reset": "prisma migrate reset"
}, |
|
Have you tried to copy the engine in the suggested location? Did that work? Which package manager are you using? Is your workspace a monorepo setup? Is your setup hosting multiple packages in a single workspace? Is a bundler in use? If yes, which one? Is a framework in use? If yes, which one? Your project uses TypeScript or just JavaScript? When you saw our message, did it happen locally or in deployment? Where is your project deployed? This can help us better understand where the engine was searched for |
|
Have you tried to copy the engine in the suggested location? Did that work? Nope.. I am only having this issue on Vercel PREVIEW deployments. for some reason it is working on production Which package manager are you using? pnpm@8.15.0 on local dev environment. I don't know what vercel is using when I deploy it there on preview Is your workspace a monorepo setup? Yep. TurboRepo monorepo; Is a bundler in use? If yes, which one? next bundler? I think they use webpack idk Is a framework in use? If yes, which one? NextJs Your project uses TypeScript or just JavaScript? TypeScript When you saw our message, did it happen locally or in deployment? Vercel PREVIEW deployments. for some reason it is working on production. Where is your project deployed? Vercel serverless function |
|
UPDATE: I was able to solve this by putting the following in my github action. Without that, it would stop at "native" and only pick up env:
PRISMA_CLI_BINARY_TARGETS: 'debian-openssl-3.0.x'I'm having trouble making my github action build -> google cloud function work. My However, after having the github action run The two engine files that are available are in the Oddly when I run I need to build the project on a different platform (github actions) than the run is happening (google cloud function), so it's very problematic that there's no Is there a way I can get this engine via the prisma CLI or soemthing, during my build step? I didn't see a way to do this in the prisma CLI, but maybe just missed it. Have you tried to copy the engine in the suggested location? Did that work?I can't, it's not available in the github action environment Which package manager are you using?Yarn Is your workspace a monorepo setup?Yes Is your setup hosting multiple packages in a single workspace?No, the google cloud function is not Is a bundler in use? If yes, which one?Yes, it's a custom one we wrote, so we can copy in the engine files ourselves... if they were the right version Is a framework in use? If yes, which one?Sort of... the google cloud "framework" Your project uses TypeScript or just JavaScript?Typescript When you saw our message, did it happen locally or in deployment?Deployment Where is your project deployed?
Paste the error message |
Have you tried to copy the engine in the suggested location? Did that work?We specify the prisma output as The error states: So when we copy the engine to /usr/src/app it works Which package manager are you using?npm Is your workspace a monorepo setup?We build these files from an Nx monorepo which is why we're trying to output to a relative directory inside the project. Everything works locally. Is a bundler in use? If yes, which one?Webpack through the @nx/webpack plugin with the following config Is a framework in use? If yes, which one?NestJS Your project uses TypeScript or just JavaScript?Typescript When you saw our message, did it happen locally or in deployment?Only in our deployed container which uses the following entrypoint script Where is your project deployed?EKS Paste the error messageError Logs |
It didn't specify how to do that copy, and Vercel's build procedure and where files are and should be is opaque to me. Yet I tried adding a command to copy the file to each of the locations it suggested. Some failed (directory didn't exist), others succeeded, so I guess it ended up in some of those spots. Yet no, it did not help.
npm 10.9.2
No.
I thought I was using Turbopack, but maybe that's just a dev-time thing? I guess it's using webpack in production? Or whatever is default for Next 15.
Aren't Next.js and Next the same thing? Next 15.3.
TS.
Deployment.
I'm trying out Vercel.
I initially avoided trying the "@prisma/nextjs-monorepo-workaround-plugin" I see mentioned in various replies in this discussion, because I'm not using a monorepo. I tried everything else I saw in this thread with no luck. Eventually I did try the workaround plugin and it did help me. So I guess the problem, and that solution, are not unique to monorepos? |
|
Have you tried to copy the engine in the suggested location? Did that work? Which package manager are you using? Is your workspace a monorepo setup? Is a bundler in use? If yes, which one? Is a framework in use? If yes, which one? Your project uses TypeScript or just JavaScript? When you saw our message, did it happen locally or in deployment? Where is your project deployed? Paste the error message I also tried various different solutions that are mentioned in previous comments, but none of them worked out for me (having output path, removing it, adding a vercel-build script, etc). Perhaps because all my backend APIs are server actions, and Vercel simply didn't copy the proper files. Very frustrating. |
|
Have you tried to copy the engine in the suggested location? Did that work? Which package manager are you using? Is your workspace a monorepo setup? Is a bundler in use? If yes, which one? Is a framework in use? If yes, which one? Your project uses TypeScript or just JavaScript? When you saw our message, did it happen locally or in deployment? Where is your project deployed? |
|
1. What bundler are you using? 2. What is the target environment or platform you're deploying to? 3. What is the version of Prisma Client you're using? 4. Please paste the full error message 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. The following locations have been searched: 5. How are you importing Prisma Client? 6. What workarounds have you tried?
7. Anything else you’d like to share? To get around Prisma's bundling limitations, we manually use copy-webpack-plugin to include:
However, to make it work at runtime, we must duplicate these files inside every individual service/module folder, like: dist/ This duplication works, but is painful and not scalable across many services. It would be much more efficient if Prisma: |
|
Have you tried to copy the engine in the suggested location? Did that work? Which package manager are you using? Is your workspace a monorepo setup? Is a bundler in use? If yes, which one? Is a framework in use? If yes, which one? Your project uses TypeScript or just JavaScript? When you saw our message, did it happen locally or in deployment? Where is your project deployed? Paste the error message |
|
I am having the same problem when trying to use prisma-client-js with defined output. What is more I am using Zenstack. |
|
2025-07-26T09:28:36.042Z [error] 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. We would appreciate if you could take the time to share some information with us. The following locations have been searched: |
|
You could try to set Not too sure if this is the case mentioned here, my case was bundling with pkg/deno. |
|
Have you tried to copy the engine in the suggested location? Did that work? Which package manager are you using? Is your workspace a monorepo setup? Is a bundler in use? If yes, which one? Is a framework in use? If yes, which one? Your project uses TypeScript or just JavaScript? When you saw our message, did it happen locally or in deployment? Where is your project deployed? Paste the error message: Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x". 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. We would appreciate if you could take the time to share some information with us. The following locations have been searched: I've also tried manually setting the arch for my engine with SST. Please note this is targetting neondb but that shouldn't matter. My guess is that prisma just really doesn't like the 3.0.x which sucks because AWS seems to need it. my generator: when I searched my local node_modules/.prisma/client I got: so it's IN there. Whether it's being sent to AWS, or used while in AWS, I can't say. This is causing my project to be unusable with prisma. |
|
Resoved by using the nextjs monorepo workaround plugin. It was not recommended in my error message, but I did find it reading through this error thread. https://www.npmjs.com/package/@prisma/nextjs-monorepo-workaround-plugin Which package manager are you using? Is your workspace a monorepo setup? Is a bundler in use? If yes, which one? Is a framework in use? If yes, which one? Your project uses TypeScript or just JavaScript? When you saw our message, did it happen locally or in deployment? Where is your project deployed? Paste the error message 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. We would appreciate if you could take the time to share some information with us. The following locations have been searched: |
Have you tried to copy the engine in the suggested location? Did that work?Our error message suggested you to copy the engine somewhere. How did that go? Which package manager are you using?For instance Is your workspace a monorepo setup?Is your setup hosting multiple packages in a single workspace? Is a bundler in use? If yes, which one?Are you using Is a framework in use? If yes, which one?Are you using Your project uses TypeScript or just JavaScript?Do you prefer using TypeScript or JavaScript within your project, or both? When you saw our message, did it happen locally or in deployment?The message was "Please help us by answering a few questions". Where is your project deployed?Are you deploying to Vercel, Netlify, Lambda, or something else? Paste the error messageThis can help us better understand where the engine was searched for |
|
The same here. I'm using Vercel and I got an error like this: |
|
Have you tried to copy the engine in the suggested location? Did that work? Which package manager are you using? Is your workspace a monorepo setup? Is a bundler in use? If yes, which one? Is a framework in use? If yes, which one? Your project uses TypeScript or just JavaScript? When you saw our message, did it happen locally or in deployment? Where is your project deployed? Paste the error message |
|
Next.js 16 + turbopack in vercel, I fix it by: prisma.schema and next.config.ts/mjs/js from this article: https://qiita.com/benjuwan/items/1016afb442967eb742e7 |
|
Have you tried to copy the engine in the suggested location? Did that work? Which package manager are you using? Is your workspace a monorepo setup? Is a bundler in use? If yes, which one? Is a framework in use? If yes, which one? Your project uses TypeScript or just JavaScript? When you saw our message, did it happen locally or in deployment? Where is your project deployed? Paste the error message |




Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi, you have been directed to this discussion 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 appreciate it if you could take 5 minutes to answer a few questions for us. You can write your reply directly in this discussion as a comment. Copy and paste these questions in your answer, and leave the answer blank if you don't know.
Have you tried to copy the engine in the suggested location? Did that work?
Our error message suggested you to copy the engine somewhere. How did that go?
Which package manager are you using?
For instance
npm,pnpm, oryarn. Please attach the version if you know it.Is your workspace a monorepo setup?
Is your setup hosting multiple packages in a single workspace?
Is a bundler in use? If yes, which one?
Are you using
webpack,swc,esbuild,rollup, or any other bundler?Is a framework in use? If yes, which one?
Are you using
Next.js,Next, or any other framework?Your project uses TypeScript or just JavaScript?
Do you prefer using TypeScript or JavaScript within your project, or both?
When you saw our message, did it happen locally or in deployment?
The message was "Please help us by answering a few questions".
Where is your project deployed?
Are you deploying to Vercel, Netlify, Lambda, or something else?
Paste the error message
This can help us better understand where the engine was searched for
All reactions