Next & Netlify: Query engine binary for current platform "rhel-openssl-1.0.x" could not be found.
See original GitHub issueBug description
I’m using next@11.1.0 with prisma@2.30.0 and I’m trying to deploy it on Netlify (serverless). Locally is working okay, but when I’m deploying it I have the following error:
{
message: "Query engine binary for current platform "rhel-openssl-1.0.x" could not be found. This probably happens, because you built Prisma Client on a different platform. (Prisma Client looked in "/var/task/netlify/functions/next_api_views/nextPage/chunks/query-engine-rhel-openssl-1.0.x") Searched Locations: /var/task/netlify/functions/.prisma/client /home/runner/work/bereghici.dev/bereghici.dev/common/temp/node_modules/.pnpm/@prisma+client@2.30.0_prisma@2.30.0/node_modules/@prisma/client /var/task/netlify/functions/next_api_views/nextPage /var/task/netlify/functions/next_api_views/nextPage/chunks /var/task/netlify/functions/next_api_views/nextPage/chunks /tmp/prisma-engines /var/task/netlify/functions/next_api_views/nextPage/chunks You already added the platforms "debian-openssl-1.1.x", "rhel-openssl-1.0.x" to the "generator" block in the "schema.prisma" file as described in https://pris.ly/d/client-generator, but something went wrong. That's suboptimal. Please create an issue at https://github.com/prisma/prisma/issues/new"
}
You can see the error here: https://6128d3ecc5a191be338765d7--development-bereghicidev.netlify.app/api/views
Source code: https://github.com/abereghici/bereghici.dev/tree/prisma/apps/blog
How to reproduce
Deploy a simply nextjs & prisma app to netlify
Expected behavior
Prisma client should work on Netlify.
Prisma information
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
planetScaleMode = true
}
generator client {
provider = "prisma-client-js"
previewFeatures = ["planetScaleMode"]
binaryTargets = ["native", "rhel-openssl-1.0.x"]
}
model views {
id BigInt @id @default(autoincrement())
slug String @db.VarChar(1024)
count BigInt @default(0)
}
Environment & setup
- OS: MacOS
- Database: MySQL ( planetscale )
- Node.js version: v14.17.2
Prisma Version
2.30.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Query engine binary could not be found on netlify ...
Bug description Query engine binary for current platform "rhel-openssl-1.0.x" could not be found. This probably happens, because you built ...
Read more >Netlify Forms with Next.JS not detected - Support
Hello guys, I have a subscribing newsletter forms inside a component that called in a page. I've done adding this attribute on my...
Read more >Prisma Client Binary Not Copied for Netlify Lambda ...
findOne()` invocation: Query engine binary for current platform "rhel-openssl-1.0.x" could not be found. This probably happens, because you built Prisma ...
Read more >Deployment of NextJs website - page not found
I want to deploy a Next Js website, I followed this tutorial: I used Netlify UI I got: " Page Not Found" the...
Read more >Netlify won't deploy my Next.js+Prisma app
I'm having trouble deploying this basic Next.js app with Prisma to ... which might be related: Query engine binary could not be found...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@janpio I was able to use Prisma on Netlify by configuring
next target
toexperimental-serverless-trace
. The issue appears only when I’m using theserverless
target. It can be easily reproduced using this repo https://github.com/abereghici/nextjs-prisma-test@janpio Here is a repo where I’m able to reproduce the error:
https://github.com/abereghici/nextjs-prisma-test