Mohamamd RiyanM
Convex Community4w ago
2 replies
Mohamamd Riyan

Type instantiation is excessively deep and possibly infinite. ts(2589)

Im running into a TypeScript issue in Convex and could use some guidance.

I’m getting this error:
“Type instantiation is excessively deep and possibly infinite. ts(2589)

It happens when I call an internal query using ctx.runQuery

The error seems related to the inferred internal types becoming too deep. The function itself works at runtime, but TypeScript complains.

Has anyone faced this before or found a good way to fix or work around it (e.g., type narrowing, explicit typing, or restructuring internal APIs)?

Any help would be appreciated. Thanks! 🙏
Screenshot_2025-12-18_154104.png
Was this page helpful?