Manupa Samarawickrama
Manupa Samarawickrama
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Manupa Samarawickrama on 7/21/2024 in #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
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
TTCTheo's Typesafe Cult
Created by Manupa Samarawickrama on 5/11/2023 in #questions
React Query For Asynchronous Data within Sanity Studio
I'm using the sanity studio to manage my Sanity CMS. I was able to configure a custom component that fetches data for a specific field in my sanity schema with this guide https://www.sanity.io/schemas/asynchronous-list-options-component-05f63a29. But it is using a normal fetch request which is not optimized. I thought of utilizing react-query for this but i was not able to figure out a way to wire react-query to the sanity studio client. Any input will be appreciated,
1 replies
TTCTheo's Typesafe Cult
Created by Manupa Samarawickrama on 5/10/2023 in #questions
Filters while maintaining SSG
guys i met an interesting problem, i have a ecommerce site that uses Next13 SSG, but i want to have filters on the all product page. If i use searchParams I get yeeted out of SSG. is it possible to have filters while maintaining SSG? maybe build param based paths for all possible combinations at build time? is there a better alternative?
32 replies