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
prisma@4.7.1 - "RangeError: Maximum call stack size exceeded" when clientExtensions enabled #16600
Comments
Same here. Looks like a circular dependency thing. |
Same here
|
@JoeKarow I believe @tavindev has shared his schema in the issue description - https://github.com/JoeKarow/prisma4.7.1-reproduce/blob/main/prisma/schema.prisma You can find mine in: https://gist.github.com/kachar/77747ab867f99824e40480d041133029 |
That's my schema 😄 |
I'm having this same error too. For me it only happens when I actually try to use an extension not just enabling it.
If I remove the .$extension part, everything works just fine. Starting it with ts-node.
|
Next.js app fails to run when using custom server with clientExtension feature. Without the custom server it runs fine locally but fails to build at digital ocean's app platform. |
I installed the 4.8.0 and still have the issue when building a Next.js app with |
Same issue hear without even using |
Hey @lipis @mattbajorek, sorry that you're still experiencing this. We've fixed and tested the original reproduction case, but it seems there is more to it. Could you please provide us with a reproduction? Update: Nevermind, I could reproduce it with a more complex schema |
Confirmed this still exists in 4.8.0. |
@millsp in case you still need my use case... here is what I did with |
Hey @lipis @mattbajorek @khalil-omer, I have been working on this in a an experimental branch and as part of a wider effort. I would really like to get this right for you guys, could you please try |
I got a similar error when I tried to override an existing optional property: I would love to use it like this, providing a default value based on another field readonly prisma = new PrismaClient().$extends({
result: {
user: {
name: {
needs: { name: true, username: true },
compute: (parent) => parent.name ?? parent.username,
},
},
},
}) When I pick another name it works: readonly prisma = new PrismaClient().$extends({
result: {
user: {
another_name: {
needs: { name: true, username: true },
compute: (parent) => parent.name ?? parent.username,
},
},
},
}) It would be nice if this use case would be supported, or give an error at compile time.
|
@millsp Hi - looks like you are making progress with this. With your branch installed, the call stack error is gone and
The above error is actually throwing many times. Not sure if that fact helps you debug. |
@khalil-omer Thanks, that's encouraging news. I had a quick try exporting a prisma client with an extension, but could not reproduce. Could you please share a minimal reproduction with me? If you have the time, I'd need a tsconfig and a small piece of code. |
@millsp this latest error appears to be related to As someone commented here, there is an outstanding bug with declarations. Maybe there should be a separate issue created for that. |
It seems like nested includes doesn't generate correct typescript definitions with this branch. {
include: {
blocks: {
include: {
block: true,
},
orderBy: {
sorting: 'asc',
},
},
image: true,
},
} Edit:
With latest release, and these two set to false, I still get:
|
Thanks both, I was able to reproduce and thanks for the additional information. |
Thanks to your help Many thanks for the help so far 👍 |
Hi, I'm running into this error as well. Using the 4.9.0 branch resolved the maximum call stack error, but now my nested values aren't typed. For example
Even though there aren't any type errors visible in VScode's linting and I am in fact querying the comment and the post
|
Hey @TaylorFacen, thanks for the report. Could you please create a separate issue? |
Done! #17349 . Let me know if you need any additional information. |
Can't seems to follow what is the actuals solution to this can anybody elaborate, getting the same issue |
Hey @WARDHAN10, we have fixed this issue already, and the fix is available. Please update to our latest version, and if the problem persists, we'd love if you could open a new issue with a reproduction. Thank you :) |
Bug description
Enabling
clientExtensions
feature causes TypeScript failure.How to reproduce
Please see notes on reproduction repository README: https://github.com/JoeKarow/prisma4.7.1-reproduce
Expected behavior
No response
Prisma information
Prisma schema: https://github.com/JoeKarow/prisma4.7.1-reproduce/blob/main/prisma/schema.prisma
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: