Prisma · deploy error

Prisma has detected that this project was built on Vercel

what it looks like
Prisma has detected that this project was built on Vercel, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the `prisma generate` command during the build process.

What it means

Vercel (and Netlify CI) reuse node_modules between builds, so the install step that would normally regenerate the client is skipped. Your deploy runs a client generated for an older schema, or none at all.

Common causes

  • package.json has no postinstall or build step that runs prisma generate
  • The agent removed prisma generate from the build script while "cleaning up"

How to fix it

  1. Set the build script to prisma generate && next build
  2. Or add "postinstall": "prisma generate"
  3. Redeploy (no need to clear the cache once the script runs generate)
package.json
"scripts": {
  "build": "prisma generate && next build",
  "postinstall": "prisma generate"
}

works with Prisma ORM 6.19 · Next.js 16last verified

Prompt for Cursor or Claude Code

The Vercel build fails because Prisma Client is outdated (Vercel caches dependencies). Update package.json so the build script is "prisma generate && next build" and add "postinstall": "prisma generate". Show me the diff.

Not quite your error? Paste yours into the free VibeBoot Doctor or browse the Prisma error fixer.

next: skip the next one

Skip the debugging. The VibeBoot SaaS Starter ships with this already handled: one Prisma client in src/lib/db.ts, prisma generate on every build and install, and AGENTS.md rules that tell your agent never to create another client. Plus auth and Stripe on Next.js 16.4.3. $49, one-time.

14-day money-back guarantee · lifetime updates

$ fixed it? get the next one first

New fixes for what AI agents break, by email.

When we add a fix or a Cursor rule for a new Next.js, Auth.js, Prisma or Stripe break, it goes out in the VibeBoot newsletter. Free, occasional, unsubscribe in one click.

Subscribe free