mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-30 16:16:19 +00:00
fix(typecheck): regenerate route types and skip stale dev validator
`npm run typecheck` failed with 8 TS2307 errors from Next's generated route validators referencing old page paths (e.g. calendar/page.js) after routes moved to catch-all segments. Two causes: - The production validator (.next/types) was stale. Prepend `next typegen` so `tsc` always runs against freshly generated route types. - The dev validator (.next/dev/types) is a turbopack-dev-only artifact that is absent from clean/CI checkouts and goes stale locally. `next typegen` force-re-adds it to tsconfig `include`, so exclude it instead (exclude overrides include), leaving route typing to the maintained .next/types. tsc still catches real type errors; verified `npm run typecheck` is clean and idempotent.
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@
|
||||
"test:translations": "vitest run --no-isolate lib/__tests__/translations.test.ts",
|
||||
"test:integration": "bash integration/run-tests.sh",
|
||||
"prepare": "husky",
|
||||
"typecheck": "tsc --noEmit"
|
||||
"typecheck": "next typegen && tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dnd-kit/core": "^6.3.1",
|
||||
|
||||
+2
-1
@@ -39,6 +39,7 @@
|
||||
"node_modules",
|
||||
"repos",
|
||||
"examples",
|
||||
"integration"
|
||||
"integration",
|
||||
".next/dev/types"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user