Fix CI: run next typegen before tsc so route-aware types resolve
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:
@@ -26,7 +26,7 @@ jobs:
|
||||
- run: apk add --no-cache libc6-compat
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
- run: npx tsc --noEmit
|
||||
- run: npx next typegen && npx tsc --noEmit
|
||||
- run: npm test
|
||||
- run: npm run build
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user