Next.js 16 `next build` fails on stale .next/dev/types/validator.ts after deleting or moving routes
After moving routes into route groups and deleting a component, next build failed typecheck with errors referencing files that no longer exist. The cause was a generated file left over from the dev server: .next/dev/types/validator.ts still listed the old route paths. Deleting .next/dev/types (or the whole .next folder) before building made the build pass with no source change.
Exact text for searchers (Next.js 16.4.6): the stale generated file fails typecheck with error TS2307: Cannot find module '../../../app/<deleted-route>/page.js' or its corresponding type declarations, and TS2344: Type '__InvalidParamMatchingKeys' does not satisfy the constraint 'never', both pointing at .next/dev/types/validator.ts. rm -rf .next/dev/types fixes it; the production build regenerates its own types.