Fix CI: run next typegen before tsc so route-aware types resolve
CI / test (push) Successful in 3m14s
Release / test (push) Successful in 3m7s
Release / build-and-deploy (push) Failing after 34s

This Next.js version generates LayoutProps/PageProps/RouteContext
into .next/types only via `next dev`, `next build`, or `next typegen`
(see node_modules/next/dist/docs .../06-cli/next.md). Typecheck ran
`tsc --noEmit` standalone before Build, so those globals didn't exist
yet, failing with "Cannot find name 'LayoutProps'".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-25 23:46:32 +02:00
co-authored by Claude Sonnet 5
parent bd38781502
commit 27aa625c0e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ jobs:
run: npm run lint
- name: Typecheck
run: npx tsc --noEmit
run: npx next typegen && npx tsc --noEmit
- name: Test
run: npm test