Update the prisma extension to force binaryTarget of debian-openssl-3.0.x
ericallam opened this issue · 10 comments
If you see this error:
PrismaClientInitializationError:
Invalid `prisma.users.findUnique()` invocation:
Prisma Client could not locate the Query Engine for runtime "debian-openssl-3.0.x".
This happened because Prisma Client was generated for "debian-openssl-1.1.x", but the actual deployment required "debian-openssl-3.0.x".
Add "debian-openssl-3.0.x" to `binaryTargets` in the "schema.prisma" file and run `prisma generate` after saving it:
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "debian-openssl-3.0.x"]
}
The following locations have been searched:
/app/node_modules/.prisma/client
/
You can fix it yourself by adding "native", "debian-openssl-3.0.x"
to your binaryTargets
array, like it says in the error above. Prisma allows generating many targets so this shouldn't impact your existing app that uses Prisma, it just means that Trigger.dev can also work.
Prisma extension
We need to investigate whether we can solve this automatically without requiring any changes to the prisma schema file, by adding some code to our prisma extension somehow.
Also seeing this on 3.0.9. Worked fine on 56 beta:
◇ Failed to deploy project
│
■ Error: PrismaClientInitializationError
│
│ PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime "debian-openssl-3.0.x".
│
│ This happened because Prisma Client was generated for "darwin-arm64", but the actual deployment required "debian-openssl-3.0.x".
│ Add "debian-openssl-3.0.x" to `binaryTargets` in the "schema.prisma" file and run `prisma generate` after saving it:
│
│ generator client {
│ provider = "prisma-client-js"
│ binaryTargets = ["native", "debian-openssl-3.0.x"]
│ }
Adding binaryTargets = ["native", "debian-openssl-3.0.x"]
and running prisma generate
results in this error:
Error: PrismaClientInitializationError
│
│ PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime "debian-openssl-3.0.x".
│
│ This is likely caused by a bundler that has not copied "libquery_engine-debian-openssl-3.0.x.so.node" next to the resulting bundle.
│ Ensure that "libquery_engine-debian-openssl-3.0.x.so.node" has been copied next to the bundle or in "../node_modules/.pnpm/@prisma+client@5.20.0_prisma@5.20.0/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:
Reverting my Trigger package update for now.
Can confirm that reverting to 3.0.0-beta.56
fixes the issues.
I'm using a Turborepo btw. prisma
is installed in the web
app where I'm trying to run trigger deploy
@elie222 did you use the prisma extension when using 3.0.9?
@elie222 did you use the prisma extension when using 3.0.9?
Didn't try it. Will try tomorrow. Thanks!