Error: Invalid `prisma.model.findMany()` invocation. Query engine library for current platform "debian-openssl-1.1.x" could not be found.

I get the following error whenever I try to deploy my fullstack Next js prisma project on Netlify

op PrismaClientInitializationError:
10:22:45 AM: Invalid `` invocation:
10:22:45 AM: Query engine library for current platform "debian-openssl-1.1.x" could not be found.
10:22:45 AM: You incorrectly pinned it to debian-openssl-1.1.x
10:22:45 AM: This probably happens, because you built Prisma Client on a different platform.
10:22:45 AM: (Prisma Client looked in "/opt/build/repo/node_modules/@prisma/client/runtime/")
10:22:45 AM: Searched Locations:
10:22:45 AM:   /opt/build/repo/node_modules/.prisma/client
10:22:45 AM:   /opt/build/repo/node_modules/@prisma/client
10:22:45 AM:   /opt/build/repo/node_modules/@prisma/client
10:22:45 AM:   /opt/build/repo/node_modules/.prisma/client
10:22:45 AM:   /opt/build/repo/prisma
10:22:45 AM:   /tmp/prisma-engines
10:22:45 AM:   /opt/build/repo/node_modules/.prisma/client
10:22:45 AM: To solve this problem, add the platform "debian-openssl-1.1.x" to the "binaryTargets" attribute in the "generator" block in the "schema.prisma" file:
10:22:45 AM: generator client {
10:22:45 AM:   provider      = "prisma-client-js"
10:22:45 AM:   binaryTargets = ["native"]
10:22:45 AM: }
10:22:45 AM: Then run "prisma generate" for your changes to take effect.
10:22:45 AM: Read more about deploying Prisma Client:
10:22:45 AM:     at fn.handleRequestError (/opt/build/repo/node_modules/@prisma/client/runtime/library.js:174:6750)
10:22:45 AM:     at fn.handleAndLogRequestError (/opt/build/repo/node_modules/@prisma/client/runtime/library.js:174:5907)
10:22:45 AM:     at /opt/build/repo/node_modules/@prisma/client/runtime/library.js:177:3087
10:22:45 AM:     at async /opt/build/repo/node_modules/@prisma/client/runtime/library.js:177:3294
10:22:45 AM:     at async t._executeRequest (/opt/build/repo/node_modules/@prisma/client/runtime/library.js:177:10748)
10:22:45 AM:     at async t._request (/opt/build/repo/node_modules/@prisma/client/runtime/library.js:177:10477)
10:22:45 AM:     at async loadVotes (/opt/build/repo/.next/server/pages/admin/votes.js:51:21)
10:22:45 AM:     at async getStaticProps (/opt/build/repo/.next/server/pages/admin/votes.js:74:15)
10:22:45 AM:     at async renderToHTML (/opt/build/repo/node_modules/next/dist/server/render.js:389:20)
10:22:45 AM:     at async /opt/build/repo/node_modules/next/dist/export/worker.js:354:36 {
10:22:45 AM:   clientVersion: '4.12.0',
10:22:45 AM:   errorCode: undefined
10:22:45 AM: }


message profile

I encountered a similar error recently, and I discovered a simple fix that worked for me. To resolve it, you can force Netlify to clear your deployment cache and initiate the deployment process again. Here's how:

  1. Go to your project's deployment history on Netlify.
  2. Locate and click on your last deployment.
  3. Click on the 'Retry' button.
  4. In the dropdown menu that appears, select 'Clear cache and retry with latest branch commit.'
  5. Wait for the deployment to complete successfully.

By following these steps, you can refresh the deployment and resolve any caching-related issues. Hope this helps!


Add Message

Click on the button below to add a new message to this thread


#Netlify #Javascript #deployment #database

Thread detail

Satus: Open
Messages: 1Started: 2023-05-15




Frontend Development |Backend Development |Full Website Development |Bootstrap Website upgrades | Website Debbugging | Website Hosting & deployment


Interested in hiring me or collaborating with me on a project, click on any of the links below to get my social media handle

Or contact me via Tel: (+234)-806-225-7480 | Email:
Privacy Policy

By using our website,
you agree that devmaesters can store cookies on your device and disclose information in accordance with our privacy policy.