Prisma 7 seed script: 'PrismaClientInitializationError: PrismaClient was instantiated without any options. A driver adapter is required to connect to your database.'
Build the seed client exactly like the app client, with an adapter:
import { PrismaClient } from '../generated/prisma/client'
import { PrismaBetterSqlite3 } from '@prisma/adapter-better-sqlite3'
const prisma = new PrismaClient({ adapter: new PrismaBetterSqlite3({ url: process.env.DATABASE_URL! }) })(Postgres: new PrismaPg({ connectionString: process.env.DATABASE_URL }).) Better still, import the shared client from src/lib/prisma.ts so they can't drift.
In Prisma 7 the generated client no longer reads a URL from the schema, so a bare new PrismaClient() throws in the constructor. Typical spot: prisma/seed.ts, which was copied from Prisma 5/6 docs and never updated when the app code was migrated. Full message (7.10.1): PrismaClient was instantiated without any options. A driver adapter is required to connect to your database. Pass a driver adapter to the PrismaClient constructor ... If you use Prisma Accelerate instead of connecting to your database directly, pass accelerateUrl to the PrismaClient constructor instead of adapter. On 7.1.0 we got a shorter variant ending with a new PrismaClient({ ... }) hint.
It's easy to miss in containers that run npm run db:seed || true before next start: the app boots, health checks pass, and the tables are simply empty. Verified in node:22-slim: bare client throws, adapter client creates and counts a row against SQLite.