Vignesh Gupta
Vignesh Gupta5mo ago

Type error: Type instantiation is excessively deep and possibly infinite.

I've recently started with Turborepo and migrated my existing app to turborepo. And fixes the issue but while deployment I'm having a type issue with a query that I'm using in NextJS api route Error:
web:build: ./app/api/changelog/[id]/route.ts:7:41
web:build: Type error: Type instantiation is excessively deep and possibly infinite.
web:build:
web:build: 5 | export async function GET(_: Request, context: { params: ProjectId }) {
web:build: 6 | try {
web:build: > 7 | const changelogs = await fetchQuery(api.changelog.list, {
web:build: | ^
web:build: 8 | projectId: context.params.id,
web:build: 9 | showPublished: true,
web:build: 10 | });
web:build: ./app/api/changelog/[id]/route.ts:7:41
web:build: Type error: Type instantiation is excessively deep and possibly infinite.
web:build:
web:build: 5 | export async function GET(_: Request, context: { params: ProjectId }) {
web:build: 6 | try {
web:build: > 7 | const changelogs = await fetchQuery(api.changelog.list, {
web:build: | ^
web:build: 8 | projectId: context.params.id,
web:build: 9 | showPublished: true,
web:build: 10 | });
No description
1 Reply
Michal Srb
Michal Srb5mo ago
I'd try to remove things until you get to a working state, then readd them to see what's causing the issue. This could be exporting something that shouldn't be exported from your Convex code, or importing the wrong thing, etc.

Did you find this page helpful?