What it means
Your build runs prisma generate, often in a postinstall or build script. The prisma command is not installed. If it is in devDependencies, a production install skips it. If it is not in package.json at all, npx fetches whatever version is newest, which may not match your @prisma/client.
How to fix it
-
Add
prismaat the same version as@prisma/clientUse matching versions, for example both
^6.0.0. Mismatched versions cause errors of their own. -
Move it to
dependenciesif a production install skips itIf
prismais indevDependenciesand the build says it is missing, list it underdependenciesinstead. -
Commit
package.jsonand the lock file, then deploy againA failed deploy never counts against your plan.
{
"dependencies": {
"@prisma/client": "^6.0.0",
"prisma": "^6.0.0"
}
}
What Antideploy does
Antideploy recognises this failure. It pins the prisma command to the version of your @prisma/client in its own copy of your source for the build, and tells you it did. It never edits your repository, so make the fix in your own package.json too.