8000 Generating type definitions for a library with zod and i get an error · Issue #1955 · colinhacks/zod · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Generating type definitions for a library with zod and i get an error #1955
Closed
@isaacfink

Description

@isaacfink

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleNo activity in last 60 days

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0