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
- Install the package in any project using Prisma 7+.
- 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
Bug description
When using Prisma 7+, as the
@prisma/clientruntime dependency is flagged as adependencyand not apeerDependencyonpackage.json, it overwrites the current version, and breaks everything.The fix is as easy as transferring all the runtime dependencies to
peerDependencies.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
prisma generateExpected behavior
Prisma information
Environment & setup
Prisma Version
7