Unable to require(`/home/runner/twitter-clone-1/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node`).
Prisma cannot find the required `libssl` system library in your system. Please install openssl-1.1.x and try again.
I had run
nix-shell -p openssl_1_1
and tried adding pkgs.openssl_1_1 to replit.nlx and retsrated my shell and reloaded the repl, am I missing anything else?
1 Like
It looks like you are doing most of everything correct to install openssl on the system. If it is requiring it from the node_modules
folder, maybe try installing ssl or libssl through npm?
$ npm i ssl
$ npm i openssl
$ npm i libssl
2 Likes
still get the same result sadly.
PrismaClientInitializationError:
Invalid `prisma.user.findMany()` invocation:
Unable to require(`/home/runner/twitter-clone-1/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node`).
Prisma cannot find the required `libssl` system library in your system. Please install openssl-1.1.x and try again.
Details: libssl.so.1.1: cannot open shared object file: No such file or directory
at Pn.handleRequestError (/home/runner/twitter-clone-1/node_modules/@prisma/client/runtime/library.js:171:7205)
at Pn.handleAndLogRequestError (/home/runner/twitter-clone-1/node_modules/@prisma/client/runtime/library.js:171:6358)
at /home/runner/twitter-clone-1/node_modules/@prisma/client/runtime/library.js:174:2908
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /home/runner/twitter-clone-1/node_modules/@prisma/client/runtime/library.js:174:3123
at async t._executeRequest (/home/runner/twitter-clone-1/node_modules/@prisma/client/runtime/library.js:174:10621)
at async handler (webpack-internal:///(api)/./pages/api/users/index.ts:12:23)
at async Object.apiResolver (/home/runner/twitter-clone-1/node_modules/next/dist/server/api-utils/node.js:372:9)
at async DevServer.runApi (/home/runner/twitter-clone-1/node_modules/next/dist/server/next-server.js:514:9)
at async Object.fn (/home/runner/twitter-clone-1/node_modules/next/dist/server/next-server.js:828:35)
at async Router.execute (/home/runner/twitter-clone-1/node_modules/next/dist/server/router.js:243:32)
at async DevServer.runImpl (/home/runner/twitter-clone-1/node_modules/next/dist/server/base-server.js:432:29)
at async DevServer.run (/home/runner/twitter-clone-1/node_modules/next/dist/server/dev/next-dev-server.js:831:20)
at async DevServer.handleRequestImpl (/home/runner/twitter-clone-1/node_modules/next/dist/server/base-server.js:375:20)
at async /home/runner/twitter-clone-1/node_modules/next/dist/server/base-server.js:157:99 {
clientVersion: '4.14.1',
errorCode: undefined
}
Nix support for native dynamic libraries is a little weird. Once installing the library using nix, you must retrieve the nix path to the libraries .so files, then add those paths to LD_LIBRARY_PATH
. Try doing that on your own, and if you can’t get it to work tell me and I will try to make an example tomorrow.
3 Likes
Thanks yeah I have had enough of it for one day and I hadn’t thought of LD_LIBRARY_PATH since Debian Sid 
How didn’t I think of LD_LIBRARY_PATH
? I use it quite often
1 Like