Query engine binary for current platform "rhel-openssl-1.0.x" could not be found
mkhbragg opened this issue · comments
I have been working through a RedwoodJS tutorial, which uses Prisma and deploys to Netlify. On my local machine, everything works great. However, on the deployed version I see the following error:
Error: Invalid `prisma.post.findMany()` invocation in /var/task/src/api/dist/services/posts/posts.js:16:22 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/src/node_modules/@prisma/client/runtime/query-engine-rhel-openssl-1.0.x") Files in /var/task/src/node_modules/@prisma/client/runtime: index.d.ts index.js index.js.map You already added the platform "native" 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-client-js/issues/new
Some info about the environment:
- Prisma is connecting to Postgres through Heroku.
DATABASE_URL
is defined as an environment variable in Netlify.- Build image is
Ubuntu Xenial 16.04
// schema.prisma
datasource DS {
provider = ["sqlite", "postgresql"]
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
binaryTargets = "native"
}
The repo: https://github.com/mkhbragg/redwoodjs-blog-tutorial
The app: https://keen-roentgen-d64850.netlify.app/
Is this error familiar to the Prisma team? I am brand new to Prisma and would love the help. Error
told me to open an issue so I'm opening an issue 😂 🙏
Update [SOLVED]
Was able to get the app working properly in Netlify by adding "rhel-openssl-1.0.x"
to generator client
. Keeping this issue open in case this is a genuine issue from Prisma perspective.
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.0.x"]
}
Closing as this is a duplicate of prisma/prisma#4011