{"record":{"id":"c3219980b9799090","repo":"angular/angular-cli","slug":"the-specified-include-path-options-include-do","errorCode":null,"errorMessage":"The specified include path '${options.include}' does not exist.","messagePattern":"The specified include path '(.+?)' does not exist\\.","errorType":"exception","errorClass":"SchematicsException","httpStatus":null,"severity":"error","filePath":"packages/schematics/angular/refactor/jasmine-vitest/index.ts","lineNumber":104,"sourceCode":"      const includePath = normalize(join(projectRoot, normalizedInclude));\n      searchScope = options.include;\n\n      let dirEntry: DirEntry | null = null;\n      try {\n        dirEntry = tree.getDir(includePath);\n      } catch {\n        // Path is not a directory.\n      }\n\n      // Approximation of a directory exists check\n      if (dirEntry && (dirEntry.subdirs.length > 0 || dirEntry.subfiles.length > 0)) {\n        // It is a directory\n        files = findTestFiles(dirEntry, fileSuffix);\n      } else if (tree.exists(includePath)) {\n        // It is a file\n        files = [includePath];\n      } else {\n        throw new SchematicsException(\n          `The specified include path '${options.include}' does not exist.`,\n        );\n      }\n    } else {\n      searchScope = `project '${projectName}'`;\n      files = findTestFiles(tree.getDir(projectRoot), fileSuffix);\n    }\n\n    if (files.length === 0) {\n      throw new SchematicsException(\n        `No files ending with '${fileSuffix}' found in ${searchScope}.`,\n      );\n    }\n\n    for (const file of files) {\n      reporter.incrementScannedFiles();\n      const content = tree.readText(file);\n      const newContent = transformJasmineToVitest(file, content, reporter, {","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/schematics/angular/refactor/jasmine-vitest/index.ts#L86-L122","documentation":"Thrown by the jasmine-vitest refactor when the user-supplied --include path is neither a directory nor an existing file in the schematic Tree, so no test target can be resolved from it.","triggerScenarios":"Calling the refactor with an --include value (options.include) where tree.exists(includePath) is false and it is not a directory — misspelled path, path outside the project root, glob-only path, or a file that is not materialized in the Tree.","commonSituations":"Typos in --include; passing a glob pattern where a concrete file/dir is expected; paths relative to the wrong directory (repo root vs project root); file generated at runtime but not present in the tree.","solutions":["Correct the --include path to an existing file or directory relative to the workspace root.","Run `ls` on the path (or check it in the repo) to confirm it exists before running the refactor.","Omit --include to fall back to scanning the whole project for test files ending in the suffix.","If targeting spec files generically, rely on the default search (project root + fileSuffix) instead of --include."],"exampleFix":"// before\nng ref jasmine-vitest --include src/app/servcie/*.spec.ts\n// after\nng ref jasmine-vitest --include src/app","handlingStrategy":"validation","validationCode":"const p = path.resolve(options.include);\nif (!fs.existsSync(p)) {\n  throw new Error(`--include path does not exist: ${p}`);\n}","typeGuard":"function isExistingPath(p: string): boolean {\n  try { return fs.existsSync(p); } catch { return false; }\n}","tryCatchPattern":"try {\n  await runJasmineVitestRefactor({ include: options.include });\n} catch (e) {\n  if (String(e.message).includes('include path')) {\n    console.error(`Check the --include path (relative to workspace root): ${options.include}`);\n  } else throw e;\n}","preventionTips":["Pass directories rather than globs to --include","Verify paths are relative to the workspace root","Use tab-completion or ls to confirm paths before running","Omit --include to scan the whole project when unsure"],"tags":["angular","schematics","path-not-found","cli-options"],"backgroundTag":"include-path-not-found","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}