My NodeJS project used to run fine after being compiled into an executable, but after replacing my previous ORM with Prisma, although it is being compiled successfully when I try to run the executable, my app is working until it loads Prisma then I get this error:
/snapshot/daemon/node_modules/@prisma/client/runtime/index.js:25789
throw new PrismaClientInitializationError(
^
PrismaClientInitializationError: Unable to load Node-API Library from /snapshot/daemon/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node, Library may be corrupt
at DefaultLibraryLoader.loadLibrary (/snapshot/daemon/node_modules/@prisma/client/runtime/index.js:25789:17)
at async LibraryEngine.loadEngine (/snapshot/daemon/node_modules/@prisma/client/runtime/index.js:26093:24)
at async LibraryEngine.instantiateLibrary (/snapshot/daemon/node_modules/@prisma/client/runtime/index.js:26051:5) {
clientVersion: '4.3.1',
errorCode: undefined
}
Note: The project is running fine without compiling after adding Prisma.
Any idea how I can solve it?