Skip to content

After 204 API routes, every route gets Type instantiation is excessively deep and possibly infinite. TS error for $fetch and useFecth #33735

@patriktoth67

Description

@patriktoth67

In a larger project, we have over 204 api routes. If I check frontend\.nuxt\types\nitro-routes.d.ts, each route after the 204-th, when used in $fetch or useFetch will get me a Type instantiation is excessively deep and possibly infinite. error.

Image Image

Explicitly typing anything, the return value, the api url, the options, the full $fetch, nothing solves the issue.

Is there a way to solve this? If turning off typed server routes is the only solution, so be it, but where can I do that?

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions