[go: nahoru, domu]

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

typescript compile throws errors for prisma version over 5.13.0 #450

Open
andreicon opened this issue May 15, 2024 · 10 comments
Open

typescript compile throws errors for prisma version over 5.13.0 #450

andreicon opened this issue May 15, 2024 · 10 comments

Comments

@andreicon
Copy link

Describe the Bug
When compiling project dist with typescript compile, it will throw errors similar to
errors

To Reproduce
Install latest dependencies and generate client and typescript-graphql schema.
Run tsc.

Expected Behavior
tsc compiles successfully

Environment (please complete the following information):

  • OS: Ubuntu 24.04
  • Node v20.12.2
  • typegraphql-prisma 0.27.2
  • Prisma 5.14.0
  • TypeScript 5.4.5

Additional Context
using @prisma/generator-helper and @prisma/internals versions 5.13.0 works

@jessekrubin
Copy link
jessekrubin commented May 15, 2024

Encountering this as well. createManyAndReturn is new to prisma (https://github.com/prisma/prisma/releases/tag/5.14.0)

Also the new omit could be causing problems (but I do not know).

@andreicon I looked at your PR. locking the generator version(s) seems icky. The problem is that createMany is 1) relatively new to sqlite and 2) now returns the updated data

@felippi
Copy link
felippi commented May 29, 2024

Just add override on your package.json until the corretion of typegraphql


"overrides": {
    "typegraphql-prisma": {
      "@prisma/generator-helper": "<=5.13.0",
      "@prisma/internals": "<=5.13.0"
    }
  }

edit:
Use npm list @prisma and npm list @prisma/internals to show all dependencies of @prisma, ensure that none of them use @prisma greater than 5.13
Obviously, after that, execute npm install

@andreicon
Copy link
Author

i'm not sure why @felippi is being downvoted, i did exactly that

@felippi
Copy link
felippi commented Jun 3, 2024

i'm not sure why @felippi is being downvoted, i did exactly that

Use *npm list @prisma and npm list @prisma/internals to show all dependencies of @prisma, ensure that none of them use @prisma greater than 5.13
Obviously, after that, execute npm install

@jessekrubin
Copy link

@andreicon bc it feels dirty and is not an actual fix as well as it is a fix that must be undone.

@felippi
Copy link
felippi commented Jun 3, 2024

@andreicon bc it feels dirty and is not an actual fix as well as it is a fix that must be undone.

I only suggested an alternative that worked for me until the definitive alternative comes, now if these people can afford to have their applications not working until a definitive solution comes, then don't use that and leave your application not working until one appears a clean solution

@jessekrubin
Copy link

@felippi a thumbs down is not a personal attack (AFAIK). I support what you're saying!

All the best!
Regards,
Jesse

@eduardolundgren
Copy link

Hello @MichalLytek,

Do you have any updates on this issue?

Thanks.

@savager
Copy link
savager commented Jun 12, 2024

For any Yarn users out there. I chose 5.4.2 because that was the version I previously ran, but obviously any version before 5.14

"resolutions": {
		"typegraphql-prisma/@prisma/generator-helper": "5.4.2",
		"typegraphql-prisma/@prisma/internals": "5.4.2",
		"typegraphql-prisma/@prisma/engines": "5.4.2"
	}

@DanLeCornu
Copy link

For any pnpm-ers out there, the syntax is a little different than npm (as provided in @felippi's answer):

in root package.json

  "pnpm": {
    "overrides": {
      "typegraphql-prisma>@prisma/generator-helper": "<=5.13.0",
      "typegraphql-prisma>@prisma/internals": "<=5.13.0"
    }
  },

from the pnpm docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants