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
You would need to add an option of
binaryTargets
in generator block in yourschema.prisma
file as mentioned in docs.Adding
debian-openssl-1.1.x
to your generator should solve your issue.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.