Hi 星川 健太,
The error you are encountering with Prisma in Azure Functions is due to a mismatch between the Prisma Client's generated binary and the runtime environment. Specifically, your Prisma Client is generated for "debian-openssl-3.0.x," while the Azure Functions environment is looking for "debian-openssl-1.1.x."
To resolve this, you need to update your schema.prisma
file to include "debian-openssl-1.1.x" in the binaryTargets
section, like this:
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "debian-openssl-1.1.x"]
}
After making this change, run prisma generate
to regenerate the Prisma Client with the correct binary target. This should help prevent the error from occurring after your functions restart.
To help you better understand, kindly refer to the documentation below:
For more clarification on these issue please refer the below links as well.
I hope this addresses your query. Please let me know if you need any further assistance or clarification.