question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`@prisma/client@x is not compatible with prisma2@y. Their versions need to be equal.`, generates anyway

See original GitHub issue
C:\Users\Jan\Documents\throwaway\1496
λ npx prisma2@alpha generate
⚠️ @prisma/client@2.0.0-preview021 is not compatible with prisma2@2.0.0-alpha.735. Their versions need to be equal.
Generated Prisma Client to .\node_modules\@prisma\client
Done in 13.52s

Is this a warning or an error? The further output indicates it generated anyway. Should it do that or should it really fail?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
janpiocommented, Feb 10, 2020

Decision: We talked it through, and right now there is no reason to have this warning in the first place because CLI and Client can currently be used in any combination. In the future we might want to have a versioning system for the internal API, which could lead to errors on mismatch.

1reaction
janpiocommented, Feb 10, 2020
  1. You’re going to assume @prisma/photon@2.0.0-preview018.2 and prisma2@2.0.0-preview018.2 are the same package when you first scan over it. The names are too similar. We should make this more clear that the Prisma Client depends on a particular version of the CLI

The error message should probably make this more explicit by not just printing the package names, but annotating them in some way.

2. We should call out that this is a warning and you may not need to deal with this. This is 5 minutes of focus lost on something that’s not building my product.

In the comments above we are discussing if a warning is actually enough here or if this should/has to be an error.

Lastly a matter of opinion: this communicates to me that Prisma is going to regularly make breaking changes to the Prisma Client runtime, so Prisma requires you to keep these packages in lockstep.

This makes me sad. We should know when we’re going to make breaking changes and show this warning at those transition marks (with custom messages), not every single time.

Valid point, please open a new issue for this so this does not get lost.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not resolve @prisma/client despite the installation that ...
Please try to install it by hand with npm install @prisma/client and rerun prisma generate . (Which I tried and doesn't make any...
Read more >
Generating the client (Concepts) - Prisma
This page explains how to generate Prisma Client. It also provides additional context on the generated client, typical workflows and Node.js configuration.
Read more >
Prisma Client
Prisma Client is an auto-generated, type-safe query builder generated based on the models and attributes of your Prisma schema.
Read more >
Advanced type safety (Reference) - Prisma
Prisma Client provides full type safety for queries, even for partial queries or included relations. This page explains how to leverage the generated...
Read more >
Prisma Client API (Reference)
The unique field in the where option and the unique field in the create option have the same value. If your query does...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found