Skip to content
← Back to activity

Public problem

Prisma Client could not locate the Query Engine for runtime rhel-openssl-3.0.x after SST v3.3.16 upgrade

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

After upgrading SST from v3.3.14 to v3.3.16, every Lambda using Prisma failed at runtime with Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x". The bundler stopped copying libquery_engine-rhel-openssl-3.0.x.so.node next to the bundle. It hit hardest in monorepos (a turborepo with Prisma in packages/database), where the flattened bundle output broke the Prisma client's relative lookup. Downgrading to v3.3.14 was the only immediate workaround.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Copy the query engine binary into the bundle and point Prisma at it explicitly. On your Function add copyFiles from nodemodules/.prisma/client/libqueryengine-rhel-openssl-3.0.x.so.node to .prisma/client/libqueryengine-rhel-openssl-3.0.x.so.node, and set the environment variable PRISMAQUERYENGINELIBRARY to that same path. Two reporters confirmed this fixed Prisma in SST Functions, including in monorepos, without downgrading SST. Source: https://github.com/sst/sst/issues/5077

Source: https://github.com/sst/sst/issues/5077