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:
@@ -39,7 +39,7 @@ jobs:
|
|||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
- name: Typecheck
|
- name: Typecheck
|
||||||
run: npx tsc --noEmit
|
run: npx next typegen && npx tsc --noEmit
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: npm test
|
run: npm test
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
- run: apk add --no-cache libc6-compat
|
- run: apk add --no-cache libc6-compat
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
- run: npx tsc --noEmit
|
- run: npx next typegen && npx tsc --noEmit
|
||||||
- run: npm test
|
- run: npm test
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user