Prisma does not seem to get rhel binary in functions #55
Description
I've been following this example and it works on "standard netlify" : https://github.com/garrypolley/deployment-example-netlify
I'm attempting to use next as well on a private site API ID: c076fc19-1890-4dd6-b610-1b57342b8c39
Whenever any attempt to query the database is made I get the following error:
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 "/query-engine-rhel-openssl-1.0.x")
Files in /:
bin
boot
dev
etc
home
lib
lib64
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var
You already added the platforms "native", "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-client-js/issues/new
I believe this is because the rhel binary is not shipping inside the bundled function that goes in the out_functions
directory.
I've tried a lot of options:
- bundling the primsa client in my own code -- still misses the rhel binary
- copying over the binary to each of the output directories in a custom build plugin -- still misses the same error
I think if the rhel binary can be found on the running lambda disk then this environment variable could be set and it'd work PRISMA_QUERY_ENGINE_BINARY
There are a few issues logged for this across Netlify and Primsa githubs. And also a community post as well https://community.netlify.com/t/prisma-client-binary-not-copied-for-netlify-lambda-functions-for-graphql-server/11701
I'm happy to help troubleshoot further.