Skip to content

Prisma 7+ is incompatible with Prisma CLI 6.19 #32

Description

@joojscript

Bug description

When using Prisma 7+, as the @prisma/client runtime dependency is flagged as a dependency and not a peerDependency on package.json, it overwrites the current version, and breaks everything.

The fix is as easy as transferring all the runtime dependencies to peerDependencies.

❯ prisma generate
Loaded Prisma config from prisma.config.ts.

Prisma schema loaded from prisma/schema.prisma
Error: 
✔ Generated Prisma Client (7.0.0) to ./src/generated/prisma in 12ms

Prisma schema validation - (get-dmmf wasm)
Error code: P1012
error: Argument "url" is missing in data source block "db".
  -->  schema.prisma:11
   | 
10 | 
11 | datasource db {
12 |   provider = "postgresql"
13 | }
   | 

Validation Error Count: 1
[Context: getDmmf]

Prisma CLI Version : 6.19.0


error: "prisma" exited with code 1

I've fixed it locally, and updated to a fork, if you want to take a look: joojscript@9b8c879

Also, here's a PR to fix it: #33

How to reproduce

  1. Install the package in any project using Prisma 7+.
  2. Try to run prisma generate

Expected behavior

  • Correctly build the prisma client, no matter the version.

Prisma information

Environment & setup

  • OS: Any (tested on MacOS and Linux)
  • Database: Postgres
  • Node version: 22.0

Prisma Version

7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions