{"record":{"id":"79244b0d83d07ab7","repo":"eyaltoledano/claude-task-master","slug":"outputpath-is-required-and-must-be-a-non-empty-str","errorCode":null,"errorMessage":"outputPath is required and must be a non-empty string","messagePattern":"outputPath is required and must be a non-empty string","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/ui/parse-prd.js","lineNumber":171,"sourceCode":"\tresearch = false,\n\tforce = false,\n\texistingTasks = [],\n\tnextId = 1\n}) {\n\t// Input validation\n\tif (\n\t\t!prdFilePath ||\n\t\ttypeof prdFilePath !== 'string' ||\n\t\tprdFilePath.trim() === ''\n\t) {\n\t\tthrow new Error('prdFilePath is required and must be a non-empty string');\n\t}\n\tif (\n\t\t!outputPath ||\n\t\ttypeof outputPath !== 'string' ||\n\t\toutputPath.trim() === ''\n\t) {\n\t\tthrow new Error('outputPath is required and must be a non-empty string');\n\t}\n\n\t// Build and display the main message box\n\tconst message = buildMainMessage({\n\t\tprdFilePath,\n\t\toutputPath,\n\t\tnumTasks,\n\t\tmodel,\n\t\ttemperature,\n\t\tappend,\n\t\tresearch\n\t});\n\tdisplayMainMessageBox(message);\n\n\t// Display append/force notices beneath the boxen if either flag is set\n\tif (append || force) {\n\t\t// Add append mode details if enabled\n\t\tif (append) {","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/src/ui/parse-prd.js#L153-L189","documentation":"displayParsePrdStart also requires a valid outputPath where parsed tasks will be written. It throws when outputPath is missing, not a string, or empty/whitespace-only. The PRD path may be fine but the destination must also be a usable string before the UI banner renders.","triggerScenarios":"Calling displayParsePrdStart with outputPath undefined/null, a non-string (e.g. number or object), or whitespace-only string, while prdFilePath passed validation.","commonSituations":"--output flag omitted and no default applied; options object built from JSON config missing the output key; passing a Path object or number instead of a string; trailing-slash-only or whitespace value from a shell variable.","solutions":["Supply an explicit outputPath string such as '.taskmaster/tasks'","Ensure the CLI/config layer defaults output to '.taskmaster/tasks' when unset","Cast or normalize any Path-like value with String(path) before calling"],"exampleFix":"// before\nconst output = cfg.tasksDir; // possibly undefined\ndisplayParsePrdStart(prd, output, options);\n// after\nconst output = cfg.tasksDir || '.taskmaster/tasks';\ndisplayParsePrdStart(prd, output, options);","handlingStrategy":"validation","validationCode":"if (typeof outputPath !== 'string' || outputPath.trim() === '') {\n  outputPath = '.taskmaster/tasks'; // apply default before calling\n}","typeGuard":"const isUsablePath = (v) => typeof v === 'string' && v.trim().length > 0;","tryCatchPattern":"try {\n  displayParsePrdStart(prdFilePath, outputPath, options);\n} catch (err) {\n  if (err.message.startsWith('outputPath is required')) {\n    displayParsePrdStart(prdFilePath, '.taskmaster/tasks', options);\n  } else throw err;\n}","preventionTips":["Always provide an explicit --output or default to '.taskmaster/tasks'","Convert Path/URL objects to strings before passing","Validate both path arguments together in one guard","Avoid building options objects from sparse config without defaults"],"tags":["validation","arguments","ui"],"backgroundTag":"missing-required-argument","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}