{"record":{"id":"3e506523c31edbca","repo":"affaan-m/ECC","slug":"missing-value-for-target-3e5065","errorCode":null,"errorMessage":"Missing value for --target","messagePattern":"Missing value for --target","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/consult.js","lineNumber":214,"sourceCode":"    target: DEFAULT_TARGET,\n    limit: DEFAULT_LIMIT,\n    json: false,\n    help: false,\n  };\n\n  if (args.includes('--help') || args.includes('-h')) {\n    parsed.help = true;\n    return parsed;\n  }\n\n  for (let index = 0; index < args.length; index += 1) {\n    const arg = args[index];\n\n    if (arg === '--json') {\n      parsed.json = true;\n    } else if (arg === '--target') {\n      if (!args[index + 1] || args[index + 1].startsWith('-')) {\n        throw new Error('Missing value for --target');\n      }\n      parsed.target = args[index + 1];\n      index += 1;\n    } else if (arg === '--limit') {\n      if (!args[index + 1]) {\n        throw new Error('Missing value for --limit');\n      }\n      parsed.limit = Math.min(parsePositiveInteger(args[index + 1], '--limit'), MAX_LIMIT);\n      index += 1;\n    } else if (arg.startsWith('-')) {\n      throw new Error(`Unknown argument: ${arg}`);\n    } else {\n      parsed.queryParts.push(arg);\n    }\n  }\n\n  if (!SUPPORTED_INSTALL_TARGETS.includes(parsed.target)) {\n    throw new Error(","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/consult.js#L196-L232","documentation":"Argument guard in parseArgs: --target was given but the next argv token is missing or starts with '-', so no target value was supplied; parseArgs is a generic CLI parser and the at-fault input is the malformed --target flag.","triggerScenarios":"Thrown at scripts/consult.js:214 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply a target immediately after the flag: --target <name>.","If the target legitimately starts with '-', use '--' separation or quote/escape it per the tool docs.","Default target applies if the flag is omitted entirely."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}