{"record":{"id":"6c5d819b7a4ecebc","repo":"eyaltoledano/claude-task-master","slug":"config-missing-6c5d81","errorCode":"CONFIG_MISSING","errorMessage":"The configuration file is missing. Run \"task-master init\" to create it.","messagePattern":"The configuration file is missing\\. Run \"task-master init\" to create it\\.","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/modules/task-manager/response-language.js","lineNumber":35,"sourceCode":"\n\t// Use centralized config path finding instead of hardcoded path\n\tconst configPath = findConfigPath(null, { projectRoot });\n\tconst configExists = isConfigFilePresent(projectRoot);\n\n\tlog(\n\t\t'debug',\n\t\t`Checking for config file using findConfigPath, found: ${configPath}`\n\t);\n\tlog(\n\t\t'debug',\n\t\t`Checking config file using isConfigFilePresent(), exists: ${configExists}`\n\t);\n\n\tif (!configExists) {\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror: {\n\t\t\t\tcode: 'CONFIG_MISSING',\n\t\t\t\tmessage:\n\t\t\t\t\t'The configuration file is missing. Run \"task-master init\" to create it.'\n\t\t\t}\n\t\t};\n\t}\n\n\t// Validate response language\n\tif (typeof lang !== 'string' || lang.trim() === '') {\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror: {\n\t\t\t\tcode: 'INVALID_RESPONSE_LANGUAGE',\n\t\t\t\tmessage: `Invalid response language: ${lang}. Must be a non-empty string.`\n\t\t\t}\n\t\t};\n\t}\n\n\ttry {","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/scripts/modules/task-manager/response-language.js#L17-L53","documentation":"setResponseLanguage() first checks that the project's configuration file exists (configExists). If not, it returns CONFIG_MISSING instead of attempting a read-modify-write on a non-existent file. The project was never initialized or the config file was deleted/renamed.","triggerScenarios":"Calling setResponseLanguage(lang, projectRoot) where projectRoot contains no .taskmaster/config.json (or whatever config path is configured) — running the command outside an initialized task-master project, or after the .taskmaster directory was removed or is gitignored-and-unchecked-out.","commonSituations":"Running `task-master response-language` in a fresh repo before `task-master init`; cloning a repo where .taskmaster was gitignored; wrong working directory (parent of the real project) so projectRoot points at a folder without config.","solutions":["Run `task-master init` in the project root to create the config file, then retry setting the response language.","cd into the correct project root (the directory containing .taskmaster/) before running the command.","If the config lives elsewhere (monorepo), point projectRoot at the directory that actually holds the task-master config.","Restore the deleted config from version control if .taskmaster/config.json was tracked and removed."],"exampleFix":"// before\n$ cd ~/repos/app && task-master response-language --set spanish // CONFIG_MISSING\n// after\n$ cd ~/repos/app && task-master init && task-master response-language --set spanish","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nconst path = require('path');\nconst cfgPath = path.join(projectRoot, '.taskmaster', 'config.json');\nif (!fs.existsSync(cfgPath)) {\n  throw new Error('Config file missing — run `task-master init` before setting response language');\n}","typeGuard":null,"tryCatchPattern":"const res = await setResponseLanguage(lang, projectRoot);\nif (!res.success && res.error?.code === 'CONFIG_MISSING') {\n  console.error(`No task-master config in ${projectRoot} — run \"task-master init\"`);\n}","preventionTips":["Always run `task-master init` in a new repo before any configuration commands.","cd to the directory containing .taskmaster/ before running CLI commands.","Don't gitignore .taskmaster/config.json if you want it provisioned on clone (or script an init step).","In monorepos, explicitly pass the correct projectRoot instead of relying on cwd detection."],"tags":["configuration","missing-file","initialization"],"backgroundTag":"missing-config-file","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}