-
Notifications
You must be signed in to change notification settings - Fork 29.3k
Labels
TypeScriptRelated to types with Next.js.Related to types with Next.js.
Description
For me, I don't have the rootDir
set butnext typegen
and next dev
generates different output for validators.ts
.
I have a frontend
directory where my next code resides. I'm runnning both of these commands from my project's root.
`next typegen frontend`` - This one is correct

next dev frontend
- This one is incorrect

My tsconfig - frontend/tsconfig.json
{
"compilerOptions": {
"noEmit": true,
"moduleResolution": "bundler",
"target": "es2024",
"lib": ["dom", "dom.iterable", "es2024"],
"module": "esnext",
"strict": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"forceConsistentCasingInFileNames": true,
"plugins": [{ "name": "next" }],
"paths": {
"@/*": ["./*"]
},
"resolveJsonModule": true,
"verbatimModuleSyntax": true,
"jsx": "preserve",
"skipLibCheck": true,
"incremental": true,
"esModuleInterop": true,
"allowJs": true,
"exactOptionalPropertyTypes": true,
"types": []
},
"include": [
"next-env.d.ts",
"app/**/page.tsx",
"app/**/error.tsx",
"app/**/not-found.tsx",
"app/**/layout.tsx",
"app/**/route.ts",
"trpc/**/*.ts",
".next/types/**/*.ts",
"types/*.d.ts",
"middleware.ts"
],
"exclude": ["node_modules"]
}
Metadata
Metadata
Assignees
Labels
TypeScriptRelated to types with Next.js.Related to types with Next.js.