[Convex Auth]: convexAuth() causes "Type instantiation is excessively deep and possibly infinite."
We get the
Type instantiation is excessively deep and possibly infinite.
error on our api
object whenever we export our Convex auth stuff from auth.ts
, e.g. with this simple example:
If we remove export
from the above (such that it does not occur in our Convex generated files), our api
type instantiation is not excessively deep.2 Replies
We are still experiencing this issue. If we comment out our
auth.ts
file, the excessively deep-warning disappears. Any ideas @Michal Srb or @sshader ? Thanks 🌞As a workaround, you can always add some type casts or explicit type annotations. I'm not sure what's causing this type error since I haven't seen it in other projects with Convex Auth.
E.g.
(or add explicit type annotations for the things you care about like,
auth
)
Curious if you're able to narrow down the problem by seeing which exported type is problematic