RedwoodJS Tutorial: Netlify Deployment | Unfound Prisma engine binary

Query engine binary for current platform "rhel-openssl-1.0.x" could not be found :point_left: that’s an error :grin:

Hi there!
I am working through the tutorial, and absolutely loving RedwoodJS so far. It is like magic. :sparkles: :mage:

When I got to the Netlify deployment step, I discovered that there is an issue with Prisma running on the platform my Netlify app is using (Ubuntu Xenial 16.04, which is the current default). I have created an issue on Prisma and am cross-posting here in case someone else in the RedwoodJS community runs (or has run) into this problem. If you know a workaround, please let me know!

UPDATE:
I tried switching the build image to Ubuntu Trusty 14.04 and now I don’t get the error above, but I do get a 502 Bad Gateway response from GraphQL. Any thoughts?

UPDATE 2:
Build image selection on Netlify is in beta, so that could be the reason for the 502 error when switching from Ubuntu Xenial 16.04 to Ubuntu Trusty 14.04.

UPDATE 3 (SOLVED):
I was able to get the app to function normally by adding "rhel-openssl-1.0.x" to the binaryTargets listed in api/prisma/schema.prisma. Below is what my generator client object looks like:

// api/prisma/schema.prisma

generator client {
  provider      = "prisma-client-js"
  binaryTargets = ["native", "rhel-openssl-1.0.x"]
}

We may want to update the tutorial docs to include this.

Hi @mk.ultra … you’re 100% correct.

Starting with RW v 0.20.0 and Prisma 2.9, there needs to be:

Manual Code Modifications

  1. Prisma v2.9 requires an additional binaryTarget for production deploys to build correctly:
  • add the additional binaryTarget "rhel-openssl-1.0.x" to api/prisma/schema.prisma
  • see this example

This was outlined in RedwoodJS v0.20.0 🚀 but the tutorial is likely out of date – and I know @rob is working on a “Two”-torial sequel and should address this.

I’ve added an issue to address.

https://github.com/redwoodjs/redwoodjs.com/issues/446

Thanks!

1 Like

Apparently Prisma changed something on their end that caused this and I believe they have a fix coming… 2.11.0 maybe?