when i deploy my app to vercel, an error message appears in my vercel log
2025-10-28T09:00:21.117Z [error] Unhandled Rejection: PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x".
This is likely caused by tooling that has not copied "libquery_engine-rhel-openssl-3.0.x.so.node" to the deployment folder.Ensure that you ran `prisma generate` and that "libquery_engine-rhel-openssl-3.0.x.so.node" has been copied to "node_modules/.prisma/client".
We would appreciate if you could take the time to share some information with us.Please help us by answering a few questions: https://pris.ly/engine-not-found-tooling-investigation
The following locations have been searched: /var/task/node_modules/.prisma/client /var/task/node_modules/@prisma/client /vercel/path0/node_modules/@prisma/client /tmp/prisma-engines at ml (/var/task/node_modules/@prisma/client/runtime/library.js:64:805) at async Object.loadLibrary (/var/task/node_modules/@prisma/client/runtime/library.js:111:7998) at async Qr.loadEngine (/var/task/node_modules/@prisma/client/runtime/library.js:112:448) at async Qr.instantiateLibrary (/var/task/node_modules/@prisma/client/runtime/library.js:111:11901)2025-10-28T09:00:21.122Z [error] Error [PrismaClientInitializationError]: Prisma Client could not locate the Query Engine for runtime "rhel-openssl-3.0.x".
This is likely caused by tooling that has not copied "libquery_engine-rhel-openssl-3.0.x.so.node" to the deployment folder.Ensure that you ran `prisma generate` and that "libquery_engine-rhel-openssl-3.0.x.so.node" has been copied to "node_modules/.prisma/client".
We would appreciate if you could take the time to share some information with us.Please help us by answering a few questions: https://pris.ly/engine-not-found-tooling-investigation
The following locations have been searched: /var/task/node_modules/.prisma/client /var/task/node_modules/@prisma/client /vercel/path0/node_modules/@prisma/client /tmp/prisma-engines at ignore-listed frames { clientVersion: '6.18.0', errorCode: undefined, retryable: undefined}2025-10-28T09:00:21.138Z [fatal] Node.js process exited with exit status: 128. The logs above can help with debugging the issue.I found the solution here:
https://qiita.com/benjuwan/items/1016afb442967eb742e7
the problem is not with the prisma application or configuration, but with nextjs 16 ignoring the Prisma binary file ( .so.node) excluded from the deployment package, which causes errors at runtime.
I need to add this code in the config file, and everything is back to normal:
outputFileTracingIncludes: {
'/api/**/*': ['./node_modules/.prisma/client/**/*'],
'/*': ['./node_modules/.prisma/client/**/*'],
},If you have the same problem, maybe you can share it here.