PrismaP
Prisma2mo ago
10 replies
Roodius

Prisma 7 in Monorepo: “url is no longer supported in schema files” + “client engine requires adapter

I'm upgrading to Prisma 7 inside a Turborepo monorepo, and I’m trying to use the classic Prisma ORM client (not Accelerate).
My folder structure looks like:

packages/
db/
prisma/
schema.prisma
prisma.config.ts
src/
client.ts
package.json
apps/
web/
api/


After upgrading to Prisma 7 and running:

npx prisma generate


I get this error:

Error: Prisma schema validation (P1012)
The datasource property
url
is no longer supported in schema files.
Move connection URLs to
prisma.config.ts
and pass either
adapter
or
accelerateUrl



If I remove url = env("DATABASE_URL") from schema.prisma, then Next.js throws:

Runtime PrismaClientConstructorValidationError
Using engine type "client" requires either "adapter" or "accelerateUrl"


It looks like Prisma is forcing me to use Accelerate, but I just want the classic ORM client for a normal Node/Next.js backend.

I tried:

Removing prisma.config.ts

Adding it back

Switching generator to prisma-client-js

Switching to prisma-client

Adding adapter config manually

Re-installing prisma & @prisma/client

Fixing monorepo imports

Nothing worked until I realized Prisma 7 changed how datasource URLs work.

What I want

A clean Prisma 7 setup that uses:

Classic Prisma ORM

prisma-client-js generator

No Accelerate

No adapter

Works in a monorepo (importing from @repo/db)

Works with Next.js API routes and NextAuth

What is the correct Prisma 7 configuration for this setup?

Specifically:

What should schema.prisma look like in Prisma 7?

What should prisma.config.ts contain to enable classic ORM without Accelerate?

How should client.ts be written?

How should package.json and tsconfig paths be set to allow imports like:

import { prisma } from "@repo/db";


Any official Prisma 7-compatible monorepo setup or working examples would be appreciated.
Was this page helpful?