prisma binary issue

I am getting an issue with deploying a application using prisma

as of now, I am have set the binaryTargets to ["native", "debian-openssl-3.0.x"]

note that I am using docker image to build the application.

Solved

8 Replies

I am getting this error in deploy logs

prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x".

Please manually install OpenSSL and try installing Prisma again.

This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:

PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime "linux-musl".

This happened because Prisma Client was generated for "linux-musl-openssl-3.0.x", but the actual deployment required "linux-musl".

Add "linux-musl" to `binaryTargets` in the "schema.prisma" file and run `prisma generate` after saving it:
generator client {

  provider      = "prisma-client-js"

  binaryTargets = ["native", "debian-openssl-3.0.x", "linux-musl"]

    at async ir.instantiateLibrary (/app/node_modules/.pnpm/@prisma+client@4.16.2_prisma@4.16.2/node_modules/@prisma/client/runtime/library.js:107:1861)
}

and even if I add the linux-musl as binary target.

I get this error

prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x".

Please manually install OpenSSL and try installing Prisma again.

This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:

PrismaClientInitializationError: Unable to require(`/app/node_modules/.pnpm/@prisma+client@4.16.2_prisma@4.16.2/node_modules/.prisma/client/libquery_engine-linux-musl.so.node`).


At the momet I am using prisma v4


it seems the fix is only avaialbe in prisma v6


Thanks for sharing the link reference, though.


You will need to fix your alpine image version then, something like node:20-alpine3.20


a year ago

!s


Status changed to Solved brody over 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...