{"record":{"id":"21121da24ca26d39","repo":"Egonex-AI/Understand-Anything","slug":"repository-path-does-not-exist-repovalue","errorCode":null,"errorMessage":"Repository path does not exist: ${repoValue}","messagePattern":"Repository path does not exist: (.+?)","errorType":"validation","errorClass":"CliUsageError","httpStatus":null,"severity":"error","filePath":"scripts/lib/large-repo-benchmark.mjs","lineNumber":257,"sourceCode":"    }\n    if (repoValue) {\n      throw new CliUsageError(`Unexpected positional argument: ${arg}`);\n    }\n    repoValue = arg;\n  }\n\n  if (help) return { help: true };\n  if (!repoValue) throw new CliUsageError('A repository path is required');\n  if (outputValue === null || outputValue.trim() === '') {\n    throw new CliUsageError('--output is required and must be non-empty');\n  }\n  if (!Number.isInteger(concurrency) || concurrency < 1 || concurrency > 32) {\n    throw new CliUsageError('--concurrency must be an integer between 1 and 32');\n  }\n\n  const repoRoot = resolve(cwd, repoValue);\n  if (!existsSync(repoRoot)) {\n    throw new CliUsageError(`Repository path does not exist: ${repoValue}`);\n  }\n  if (!statSync(repoRoot).isDirectory()) {\n    throw new CliUsageError(`Repository path is not a directory: ${repoValue}`);\n  }\n\n  const outputPath = resolve(cwd, outputValue);\n  const markdownPath = resolve(\n    cwd,\n    outputPath.toLowerCase().endsWith('.json')\n      ? `${outputPath.slice(0, -'.json'.length)}.md`\n      : `${outputPath}.md`,\n  );\n  if (isPathInsideOrEqual(repoRoot, outputPath)) {\n    throw new CliUsageError('--output must be outside the subject repository');\n  }\n  if (isPathInsideOrEqual(repoRoot, markdownPath)) {\n    throw new CliUsageError('Markdown report path must be outside the subject repository');\n  }","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/Egonex-AI/Understand-Anything/blob/32944829e7a63a9fa9c55d811d7f98a9530c6a6a/scripts/lib/large-repo-benchmark.mjs#L239-L275","documentation":"CliUsageError thrown by parseArgs when the resolved repository path (resolved relative to cwd) does not exist on the filesystem. This runs after argument validation, so all required args are present; the failure is purely that the path is not present.","triggerScenarios":"Typo in the repo path; a relative path resolved against an unexpected cwd; the repo has not been cloned yet; the path points to a remote URL instead of a local directory.","commonSituations":"Running from a different working directory than expected; a typo; referencing a repository that was never cloned or was since removed; passing a git URL where a local path is required.","solutions":["Verify the path is correct and the repository is cloned locally.","Use an absolute path to avoid cwd ambiguity.","Clone the repository first if it does not yet exist.","Confirm the cwd the command runs from."],"exampleFix":"# before\nnode benchmark-large-repo.mjs ./nonexistent --output out.json\n# after\nnode benchmark-large-repo.mjs /abs/path/to/repo --output out.json","handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs';\nif (!existsSync(resolve(cwd, repoValue))) { /* reject early */ }","typeGuard":null,"tryCatchPattern":"try { const opts = parseArgs(argv); } catch (e) { if ((e as Error).name === 'CliUsageError') { console.error(e.message); process.exit(2); } throw e; }","preventionTips":["Use absolute repo paths to avoid cwd ambiguity.","Confirm the repository is cloned locally before running."],"tags":["benchmark","cli","filesystem","path"],"backgroundTag":null,"analyzedSha":"32944829e7a63a9fa9c55d811d7f98a9530c6a6a","analyzedAt":"2026-08-12T10:25:44.261Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}