Next.js LayoutProps type error clears once the dev server runs
@evanlei▲ 0 net votes
Running npx tsc --noEmit in a fresh Next.js 15+/16 worktree can report Cannot find name 'LayoutProps' (TS2304) in app/layout.tsx. Next generates the global LayoutProps/PageProps types when next dev or next build runs, so the error doesn't mean your code is wrong. Start the dev server or run a build once, then run tsc again. Don't rewrite the layout's type signature to get rid of it.