skip to Main Content

I have a node.js project with prisma as ORM that connects to postgresdb. After I installed dependencies with yarn install I tried to run command npx prisma generate then I got error stating
Unable to require(/node_modules/prisma/libquery_engine-debian-openssl-1.1.x.so.node) libssl.so.1.1: cannot open shared object file: No such file or directory.

local setup

I have ubuntu 22.04 with node version of v16.14.2.

2

Answers


  1. You would need to add an option of binaryTargets in generator block in your schema.prisma file as mentioned in docs.

    Adding debian-openssl-1.1.x to your generator should solve your issue.

    generator client {
      provider      = "prisma-client-js"
      binaryTargets = ["debian-openssl-1.1.x"]
    }
    
    Login or Signup to reply.
  2. It seems there is an issue with the version of OpenSSL installed on your machine.
    You might need to (re)install OpenSSL.

    I suggest you create an issue on prisma/prisma

    We have a few issues about this here and the solution is often specific to the configuration.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search