-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Basic example with express: Typescript fails with Type instantiation is excessively deep and possibly infinite
#389
Comments
I also tried this with removing |
Please downgrade to zod 3.21.4 |
Thanks for the suggestion! After this downgrade I am still seeing the issue. |
We had the same issue, with zod 3.22.x, could you try a) downgrade ALL zod packages version if you are using monorepo and then This is how we solved it. Something might be related colinhacks/zod#2697 |
Hi. I have the same problem after updating ts-rest library. The problem starts to appear in version @ts-rest/core 3.30.0 |
Hey @ships. Looks like it is working with typescript 5.3 beta |
Hi, @michaelangeloio. I can’t reproduce it now. |
I haven't had a chance to upgrade Typescript but will report back if that solves the issue, it should come in a week or two on this project. |
I was able to solve it by:
|
Okay, i finally got round to this typescript-5 upgrade and can confirm that as of ts-5.2.2 I no longer have this issue. I didn't even need to upgrade to typescript 5.3 beta. |
Hi friends, I am exploring ts-rest and hope not to use Zod directly, as I use
io-ts
for a lot of similar typing work. I am following the quickstart and have installed Zod as a dev dependency. Here are my relevant versions:However, when I contrive this basic example contract and server:
I get this error on typescript compilation:
Type instantiation is excessively deep and possibly infinite. typescript (2589)
Apparently this is an issue that occurs in certain uses of Zod, but since I don't invoke Zod, i expect this might be an issue with how ts-rest calls Zod.
Can you help me understand if there is a known workaround for it while using ts-rest?
The text was updated successfully, but these errors were encountered: