Closed
Description
I am getting this error when running build command
[vite:dts] Start generate declaration files...
src/cards.ts:3:27 - error TS2589: Type instantiation is excessively deep and possibly infinite.
3 const categoryValidator = z.object({
~~~~~~~~~~
4 label: z.string(),
~~~~~~~~~~~~~~~~~~~
...
6 group: z.string()
~~~~~~~~~~~~~~~~~~
7 });
~~
the categoryValidator
is only referenced once in the same file so I am sure it's not a circular dependency, what could be causing this? It's annoying to debug this because it takes vite over 30 minutes to give up which means I have to wait 30 minutes before I get the error
Edit: I removed this validator and added it inline but I was still getting the same error, I didn't get to see the error because as mentioned it takes forever but it was there