Prisma · query error

PrismaClientValidationError: Unknown argument

what it looks like
PrismaClientValidationError:
Invalid `db.user.findMany()` invocation:

{
  where: {
    emial: "[email protected]",
    ~~~~~
  }
}

Unknown argument `emial`. Did you mean `email`? Available options are marked with ?.

What it means

The query uses a field or option the generated client doesn't know. Prisma checks every query against your schema before sending it.

Common causes

  • The agent guessed a field name (userId vs ownerId, createdAt vs created_at)
  • The field exists in schema.prisma but the client wasn't regenerated
  • A relation filter written like a scalar: where: { user: id } instead of where: { userId: id }

How to fix it

  1. Use the name Prisma suggests after "Did you mean"
  2. If the field is new, run npx prisma generate
  3. Let TypeScript check queries: don't type db or the query args as any

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

prevent it · 00-workflow.mdc (free Cursor Rules Pack): The agent searches the schema instead of inventing field names, and trusts the installed types over memory.

Prompt for Cursor or Claude Code

Prisma throws a PrismaClientValidationError (Unknown argument). Read prisma/schema.prisma, then fix the query to use the real field names. If the field was just added, run prisma generate. Don't cast to any to silence it.

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

next: skip the next one

Skip the setup. The VibeBoot SaaS Starter ships a ready prisma/schema.prisma and one Prisma client in src/lib/db.ts (SQLite by default, Postgres by changing the provider), 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