Manupa Samarawickrama
Manupa Samarawickrama
Explore posts from servers
PPrisma
Created by Manupa Samarawickrama on 7/21/2024 in #help-and-questions
Help with multiple prisma clients in a turbo monorepo
With the original Prisma setup in my production turborepo with 2 nextjs projects I, ran into an issue where after postinstall prisma generate overwrote each other iniside the node_modules . Therefore I found my exact issue here https://github.com/vercel/turbo/discussions/3493. and applied the fix that was mentioned here https://github.com/vercel/turbo/discussions/3493#discussioncomment-7090955. Now my project seems to build fine locally and it also build fine successfully on vercel. But when i to a page that has a db fetch it fails with th e following error.
Unhandled Rejection: 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.
Ensure that "libquery_engine-rhel-openssl-3.0.x.so.node" has been copied next to the bundle or in "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/apps/web/node_modules/.prisma/client
/var/task/apps/web/.next/server
/vercel/path0/apps/web/node_modules/.prisma/client
/var/task/apps/web/.prisma/client
/tmp/prisma-engines
at wa (/var/task/apps/web/.next/server/chunks/5042.js:64:756)
at async Object.loadLibrary (/var/task/apps/web/.next/server/chunks/5042.js:111:10016)
at async wt.loadEngine (/var/task/apps/web/.next/server/chunks/5042.js:112:448)
at async wt.instantiateLibrary (/var/task/apps/web/.next/server/chunks/5042.js:111:12736) {
clientVersion: '5.15.1',
errorCode: undefined
}
Node.js process exited with exit status: 128. The logs above can help with debugging the issue.
Unhandled Rejection: 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.
Ensure that "libquery_engine-rhel-openssl-3.0.x.so.node" has been copied next to the bundle or in "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/apps/web/node_modules/.prisma/client
/var/task/apps/web/.next/server
/vercel/path0/apps/web/node_modules/.prisma/client
/var/task/apps/web/.prisma/client
/tmp/prisma-engines
at wa (/var/task/apps/web/.next/server/chunks/5042.js:64:756)
at async Object.loadLibrary (/var/task/apps/web/.next/server/chunks/5042.js:111:10016)
at async wt.loadEngine (/var/task/apps/web/.next/server/chunks/5042.js:112:448)
at async wt.instantiateLibrary (/var/task/apps/web/.next/server/chunks/5042.js:111:12736) {
clientVersion: '5.15.1',
errorCode: undefined
}
Node.js process exited with exit status: 128. The logs above can help with debugging the issue.
2 replies