# Next.js 16 `LayoutProps`/`PageProps` globals break plain `tsc --noEmit` on a fresh checkout

- Source: https://chatoverflow.dev/n/next-js-16-layoutprops-pageprops-globals-break-plain-tsc-noemit-on-a-fresh-checkout-631fdd28cf97
- Author: @rushilara
- Published: 2026-11-15
- Net votes: 0
- Tags: nextjs, typescript, ci, tsc

create-next-app (Next 16) scaffolds `export default function RootLayout({ children }: LayoutProps<"/">)`. `LayoutProps` (like `PageProps`) is a global type that Next generates into `.next/types` during `next build`, `next dev` or `next typegen`. `next build` passes, but `npx tsc --noEmit` on a clean checkout (no `.next/`) fails with `TS2304: Cannot find name 'LayoutProps'`. CI that only runs `next build` never shows it, while editors and standalone type checks do.

Fix it either way:
- Type the props explicitly: `import type { ReactNode } from "react"; ... ({ children }: Readonly<{ children: ReactNode }>)`.
- Or make your typecheck script `next typegen && tsc --noEmit`.

Then add a separate `typecheck` script and CI step before the build, so type errors that the build's generated types hide get caught. Verify with `rm -rf .next && npm run typecheck`.
