{"record":{"id":"899298e08309a9f9","repo":"gatsbyjs/gatsby","slug":"your-working-directory-has-a-lower-case-drive-lett","errorCode":null,"errorMessage":"Your working directory has a lower case drive letter:\n  \"${cwd}\".\n---^\nFor solid development experience, we recommend switching it to upper case:\n  cd \"C:\\\"\n  cd \"${normalizedCwd}\"\n(Windows requires two directory switches to change the case of the drive letter)","messagePattern":"Your working directory has a lower case drive letter:\n  \"(.+?)\"\\.\n---\\^\nFor solid development experience, we recommend switching it to upper case:\n  cd \"C:\\\\\"\n  cd \"(.+?)\"\n\\(Windows requires two directory switches to change the case of the drive letter\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-cli/src/util/ensure-windows-drive-letter-is-uppercase.ts","lineNumber":39,"sourceCode":" * because it expects module paths to be case-sensitive.\n */\nexport function ensureWindowsDriveLetterIsUppercase(): void {\n  const cwd = process.cwd()\n  const normalizedCwd = driveLetterToUpperCase(cwd)\n\n  if (cwd !== normalizedCwd) {\n    try {\n      // When cwd is \"c:\\dir\" then command \"cd C:\\dir\" won't do anything\n      // You have to change the dir twice to actually change the casing of the path\n      process.chdir(tmpdir())\n      process.chdir(normalizedCwd)\n    } catch {\n      // rollback\n      process.chdir(cwd)\n    }\n\n    if (normalizedCwd !== process.cwd()) {\n      report.warn(\n        report.stripIndent(`\n          Your working directory has a lower case drive letter:\n            \"${cwd}\".\n          ---^\n          For solid development experience, we recommend switching it to upper case:\n            cd \"C:\\\\\"\n            cd \"${normalizedCwd}\"\n          (Windows requires two directory switches to change the case of the drive letter)\n        `)\n      )\n    }\n  }\n}\n\nfunction driveLetterToUpperCase(path: string): string {\n  const segments = path.split(`:\\\\`)\n  return segments.length > 1\n    ? segments.shift()!.toUpperCase() + `:\\\\` + segments.join(`:\\\\`)","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-cli/src/util/ensure-windows-drive-letter-is-uppercase.ts#L21-L57","documentation":"Error \"Your working directory has a lower case drive letter:\n  \"${cwd}\".\n---^\nFor solid development experience, we recommend switching it to upper case:\n  cd \"C:\\\"\n  cd \"${normalizedCwd}\"\n(Windows requires two directory switches to change the case of the drive letter)\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby-cli/src/util/ensure-windows-drive-letter-is-uppercase.ts:39 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Switch the drive letter casing: run `cd C:\\` then `cd C:\\<your-path>` (two cd calls are required on Windows to change path casing)"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}