New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query Engine Library Not Found #13396
Comments
Are you saying this is happening to some request but not all? That is super weird. |
Yes. This is happening intermittently, causing random requests to fail. |
That is super weird. Can you maybe reach out to Vercel and ask if anything changed on their environment? Fundamentally I would debug this by checking the actual location of the |
I am getting this error in AWS lambda node16.x
|
@janpio I fixed this by hard-pinning to the right version per environment
|
I've tried @VictorArowo's approach, but still running into issues. Bizarrely, the error is pretty contradictory:
In my particular implementation, I'm using this in a Yarn workspaces monorepo (test repo) with serverless-webpack-prisma. The same monorepo also reuses this Prisma client from a shared package in a Next.js site workspace, and Prisma works fine there, making me think my problem might actually be more specific to serverless-webpack-prisma (I've also asked there in this issue. More detailed error message:
|
Thanks @jschuur, I think your description and reproduction is specific enough that you can open a new issue and fill the template - then we can look at yours in isolation. Thanks! |
The above error seemed to be resolved, once I went and added an output setting to the generator client definition, so it doesn't really look like a new bug, just something that is not well documented. However, then I had trouble deploying it to Vercel with Yarn (frozen lock file error due to Vercel running Yarn with a 1.x option that was deprecated in Berry) and ended up trying out pnpm. Now all of a sudden it won't find the client module anymore (test repo):
I know this is no longer on topic for this thread, but I have been trying to sort this out all day and will have to file a proper bug report in the morning. Morning edit: It looks like importing |
I think the cause of this issue is that Prisma is not searching the correct directory for the binary. in my case I am compiling for AWS lambda, I get the error:
looking at the search paths it is missing
The binaries are located here and not in the |
Possibly relevant: I'm using Vercel's When
That said, it would be great if this worked out of the box! |
We've set the engine location by using the given ENV engine variables. It seems like Prisma doesn't look at these ENV values when looking for the binaries during application initialization. To reproduce
Problem occurs during running the application. |
|
I've found what goes wrong. When you supply It does work for the binary, and it will listen to that location, but for library it doesn't. We've now set it back to the binary and the binary lookup step goes succesful. |
Can you please open a bug report for this? That should definitely not be the case and we need to check and fix that. Thanks! |
@ibvodafoneziggo I can also recreate that the environment variable doesn't allow for overriding the engine library via I will try to also document steps to recreate for a bug report if I get time in the next few days. update: @ibvodafoneziggo is correct in that the |
Don't know whether this helps anyone. But let me share my experience and fix for this error. Some context:
In order to fix the
Little specific setup and an ugly solution but it works out in the end. |
This works for me, thank you. BTW, you can add the following config to your serverless.yml to exclude unnecessary generated files, and you can find documentation here package:
patterns:
- '!node_modules/prisma/**'
- '!node_modules/@prisma/engines/**' |
Hey, we wanted to give you an update about this. We have around 10 issues that we have identified to be in the "engine not found" category. Looking at these, we learned that there are four main categories responsible for these errors:
These cases were previously not detected. On top of that, the error messages were confusing and were neither helpful for you or us. With that, it is likely that many of the cases above overlapped each other. So while we cannot fix a missing engine, we can detect how and why it happened. Thanks to that, we now display more useful errors to help you out of trouble. And in some cases, we will ask some input from you to learn more about your project so we can further improve. If something is still off for you, feel free to create a new issue. |
+1 for @millsp just said. The solution for my case is to re-run |
I'm getting this in vercel production
|
Bug description
We have recently been seeing query engine library errors on our app hosted on vercel. This has been happening for about a day and suddenly started happening intermittently. This is really weird because it says it wants "rhel-openssl-1.1.x" and that we incorrectly pinned to "rhel-openssl-1.1.x".
We have tried to explicitely add
binaryTargets = ["native", "rhel-openssl-1.0.x", "rhel-openssl-1.1.x"]
, but this causes our build to fail with function size errors.I would appreciate any pointers here.
I see a related issue here: #13266
How to reproduce
It currently seems to cause random requests to error out. I am not able to identify a pattern here.
Expected behavior
I expect the right query engine library to be used.
Prisma information
Environment & setup
This is currently happening on vercel's serverless platform which I believe uses AWS.
Prisma Version
The text was updated successfully, but these errors were encountered: