#Typescript errors on build.

1 messages · Page 1 of 1 (latest)

bronze stream
#

error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.

Were getting this error from a package in the mono repo, seemingly totally random files that don't reference that package. i just wanted to confirm that even if we have imports from these packages like importing the Id Type it shouldn't be inspecting the convex folder.

I just highly doubt that this is going to be fixed by better typing our ctx and other things etc. It has to be a tsconfig config error?

safe urchin
#

@bronze stream we're real curious about these errors, usually they have to do with recursive types of some sort.

If you import the GenericId type from 'convex/values' that does not inspect the convex folder, but if you import Id from the generated file that will require reading convex/schema.ts to infer the type of Id (to figure out what table names exist)

#

We have not seen something like this due to Convex types, but it's possible to build them. This comes up when doing declaration: true, so a dramatic option is to disable that. But you want to avoid recursive types generally, so if you can find the types you should fix it with explicit annotations.

#

This is likely a recent change; it's usually not "the type finally got big enough," but rather "a recursive type was introduced," so you may be able to bisect it, trying recent commits.

bronze stream
bronze stream
#

I got rid of all Doc's and replaced Id's with GenericId, no luck.. leaving only api

bronze stream
#

if i get rid of the api and build it works but as soon as i use api from convex/_generated/api it tries to build the entire convex folder.. ive tried so many things....