Prisma · runtime error
The URL must start with the protocol postgresql://
error: Error validating datasource `db`: the URL must start with the protocol `postgresql://` or `postgres://`.
--> schema.prisma:8What it means
DATABASE_URL is set, but it doesn't match the provider in schema.prisma. Prisma checks the protocol before connecting.
Common causes
- provider = "postgresql" but DATABASE_URL is still file:./dev.db (or the other way round)
- The Supabase or Neon project URL (https://…) pasted instead of the database connection string
- Quotes or a space copied into the value in the hosting dashboard
How to fix it
- Make the provider and the URL agree: postgresql:// for Postgres, file: for SQLite
- Copy the connection string from the database's Connect panel, not the API URL
- Paste the raw value in the dashboard, without quotes
Prompt for Cursor or Claude Code
Prisma says the datasource URL has the wrong protocol. Compare the provider in prisma/schema.prisma with the protocol of DATABASE_URL (don't print the full value, just the scheme) and tell me which one to change. If I'm moving from SQLite to Postgres, update the provider and remind me to run prisma db push or migrate.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
Other Prisma errors
$ 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.