{"record":{"id":"6f8db3d033504273","repo":"eyaltoledano/claude-task-master","slug":"pathtype-override-path-does-not-exist-resolv","errorCode":null,"errorMessage":"${pathType} override path does not exist: ${resolvedPath}","messagePattern":"(.+?) override path does not exist: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/task-master.js","lineNumber":190,"sourceCode":"\t\t\t\t? override\n\t\t\t\t: path.resolve(basePath || process.cwd(), override);\n\n\t\t\tif (createParentDirs) {\n\t\t\t\t// For output paths, create parent directory if it doesn't exist\n\t\t\t\tconst parentDir = path.dirname(resolvedPath);\n\t\t\t\tif (!fs.existsSync(parentDir)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfs.mkdirSync(parentDir, { recursive: true });\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`Could not create directory for ${pathType}: ${parentDir}. Error: ${error.message}`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Original validation logic\n\t\t\t\tif (!fs.existsSync(resolvedPath)) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`${pathType} override path does not exist: ${resolvedPath}`\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn resolvedPath;\n\t\t}\n\n\t\tif (override === true) {\n\t\t\t// Required path - search defaults and fail if not found\n\t\t\tfor (const defaultPath of defaultPaths) {\n\t\t\t\tconst fullPath = path.isAbsolute(defaultPath)\n\t\t\t\t\t? defaultPath\n\t\t\t\t\t: path.join(basePath || process.cwd(), defaultPath);\n\t\t\t\tif (fs.existsSync(fullPath)) {\n\t\t\t\t\treturn fullPath;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new Error(","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/src/task-master.js#L172-L208","documentation":"resolvePath() treats explicitly provided override paths as strict: for non-output path types, it checks fs.existsSync on the resolved path and throws this error if the override points at something that does not exist. Unlike defaults, overrides are never searched or defaulted — a bad override is treated as a user error and fails fast.","triggerScenarios":"Passing --prds-path ./prd/custom.md when that file is absent; a config override pointing to a file renamed or deleted after config was written; relative paths resolved against a different cwd than expected (e.g. running from a subdirectory).","commonSituations":"Renamed/refactored files while an old path remains in .taskmaster/config.json; CI running from a different working directory so a relative override no longer resolves; typos or case-sensitivity mismatches (macOS case-insensitive vs Linux case-sensitive).","solutions":["Create the missing file/directory at the override path, or correct the path in your config/CLI flag.","Remove the override to let taskmaster fall back to its default search paths.","Use an absolute path to avoid cwd-dependent resolution issues.","Check exact spelling/case of the path, especially on case-sensitive filesystems."],"exampleFix":"// before\n// config.json\n{ \"prdPath\": \"./docs/PRD.md\" }   // file was moved\n// after\n{ \"prdPath\": \"./docs/prd/main-prd.md\" }  // or delete the override to use defaults","handlingStrategy":"validation","validationCode":"function assertOverrideExists(resolvedPath, pathType) {\n  if (!fs.existsSync(resolvedPath)) {\n    // remove the override from config or create the file before proceeding\n    throw new Error(`${pathType} override will fail — path missing: ${resolvedPath}`);\n  }\n}\nconst p = path.resolve(cfg.prdPath);\nassertOverrideExists(p, 'PRD');","typeGuard":null,"tryCatchPattern":"try {\n  paths.prd = tm.resolvePath({ prdPath: cfg.prdPath });\n} catch (err) {\n  if (err.message.includes('override path does not exist')) {\n    console.warn(err.message, '— falling back to default paths');\n    delete overrides.prdPath;\n    paths.prd = tm.resolvePath(overrides);\n  } else {\n    throw err;\n  }\n}","preventionTips":["Use absolute paths for overrides to be cwd-independent.","Keep overrides in sync when renaming/moving files (grep config for old paths).","Prefer omitting overrides and relying on default search when the default location works.","Watch for case-sensitivity differences between macOS and Linux in CI.","Validate override paths at config-load time with fs.existsSync and fail with a clear message."],"tags":["filesystem","configuration","path-resolution","validation"],"backgroundTag":"file-not-found","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}