{"record":{"id":"63c6991839bb1367","repo":"vercel/next.js","slug":"invalid-casing-detected-for-project-dir-received","errorCode":null,"errorMessage":"Invalid casing detected for project dir, received ${resolvedDir} actual path ${realDir}, see more info here https://nextjs.org/docs/messages/invalid-project-dir-casing","messagePattern":"Invalid casing detected for project dir, received (.+?) actual path (.+?), see more info here https://nextjs\\.org/docs/messages/invalid-project-dir-casing","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/lib/get-project-dir.ts","lineNumber":16,"sourceCode":"import path from 'path'\nimport { warn } from '../build/output/log'\nimport { detectTypo } from './detect-typo'\nimport { realpathSync } from './realpath'\nimport { printAndExit } from '../server/lib/utils'\n\nexport function getProjectDir(dir?: string, exitOnEnoent = true) {\n  const resolvedDir = path.resolve(dir || '.')\n  try {\n    const realDir = realpathSync(resolvedDir)\n\n    if (\n      resolvedDir !== realDir &&\n      resolvedDir.toLowerCase() === realDir.toLowerCase()\n    ) {\n      warn(\n        `Invalid casing detected for project dir, received ${resolvedDir} actual path ${realDir}, see more info here https://nextjs.org/docs/messages/invalid-project-dir-casing`\n      )\n    }\n\n    return realDir\n  } catch (err: any) {\n    if (err.code === 'ENOENT' && exitOnEnoent) {\n      if (typeof dir === 'string') {\n        const detectedTypo = detectTypo(dir, [\n          'build',\n          'dev',\n          'info',\n          'lint',\n          'start',\n          'telemetry',\n          'experimental-test',\n        ])\n","sourceCodeStart":1,"sourceCodeEnd":34,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/lib/get-project-dir.ts#L1-L34","documentation":"Error \"Invalid casing detected for project dir, received ${resolvedDir} actual path ${realDir}, see more info here https://nextjs.org/docs/messages/invalid-project-dir-casing\" thrown in vercel/next.js.","triggerScenarios":"Thrown at packages/next/src/lib/get-project-dir.ts:16 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run the command from the directory using the exact on-disk casing of the project path."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}