Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] zenstack generate fails with [email protected] #1535

Open
AmruthPillai opened this issue Jun 25, 2024 · 1 comment
Open

[Bug] zenstack generate fails with [email protected] #1535

AmruthPillai opened this issue Jun 25, 2024 · 1 comment
Milestone

Comments

@AmruthPillai
Copy link

Description and expected behavior

Prisma just released a new version 5.16.0, and this probably came with some changes to their internal types that Zenstack relied upon. When running zenstack with [email protected], I run into this bug:

> zenstack generate

⌛️ ZenStack CLI v2.2.4, running plugins
✔ Generating Prisma schema
✔ Generating PrismaClient enhancer
Error compiling generated code:
node_modules/.pnpm/@[email protected]_@[email protected][email protected]_/node_modules/.zenstack/enhance.ts:33:13 - error TS2314: Generic type 'DynamicClientExtensionThis' requires 4 type argument(s).

33     prisma: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>,
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/.pnpm/@[email protected]_@[email protected][email protected]_/node_modules/.zenstack/enhance.ts:34:77 - error TS2314: Generic type 'DynamicClientExtensionThis' requires 4 type argument(s).

34     context?: EnhancementContext<auth.User>, options?: EnhancementOptions): DynamicClientExtensionThis<Prisma.TypeMap, Prisma.TypeMapCb, ExtArgs>;
                                                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

: Error compiling generated code
 ELIFECYCLE  Command failed with exit code 1.

Right now, the solution is just to stick to the previous version of Prisma (v5.15.1) which is completely fine. Just wanted to let the devs of this amazing library in-the-know that it's would break for anyone trying to spin up a new project with latest versions.

Environment (please complete the following information):

  • ZenStack version: 2.2.4
  • Prisma version: 5.16.0
  • Database type: postgresql
@ymc9
Copy link
Member

ymc9 commented Jun 28, 2024

Thanks for filing this @AmruthPillai . I created a dup #1536 here. It'll be fixed in the upcoming 2.3.0 release!

@ymc9 ymc9 added this to the v2.3.0 milestone Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants