{"record":{"id":"57067d72e2137e88","repo":"EveryInc/compound-engineering-plugin","slug":"local-plugin-path-not-found-directpath-57067d","errorCode":null,"errorMessage":"Local plugin path not found: ${directPath}","messagePattern":"Local plugin path not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/commands/install.ts","lineNumber":240,"sourceCode":"      if (resolvedPlugin.cleanup) {\n        await resolvedPlugin.cleanup()\n      }\n    }\n  },\n})\n\ntype ResolvedPluginPath = {\n  path: string\n  cleanup?: () => Promise<void>\n}\n\nasync function resolvePluginPath(input: string, branch?: string): Promise<ResolvedPluginPath> {\n  // Only treat as a local path if it explicitly looks like one\n  if (input.startsWith(\".\") || input.startsWith(\"/\") || input.startsWith(\"~\")) {\n    const expanded = expandHome(input)\n    const directPath = path.resolve(expanded)\n    if (await pathExists(directPath)) return { path: directPath }\n    throw new Error(`Local plugin path not found: ${directPath}`)\n  }\n\n  // Skip bundled plugins when a branch is specified — the user wants a specific remote version\n  if (!branch) {\n    const bundledPluginPath = await resolveBundledPluginPath(input)\n    if (bundledPluginPath) {\n      return { path: bundledPluginPath }\n    }\n  }\n\n  // Otherwise, fetch from GitHub (optionally from a specific branch)\n  return await resolveGitHubPluginPath(input, branch)\n}\n\nfunction parseExtraTargets(value: unknown): string[] {\n  if (!value) return []\n  return String(value)\n    .split(\",\")","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/EveryInc/compound-engineering-plugin/blob/c9c10f8c75412c7232cb2bd663e5fd1cea98d84e/src/commands/install.ts#L222-L258","documentation":"`install`'s path resolver treats input starting with `.`, `/`, or `~` as a local filesystem path. It expands `~`, resolves it to an absolute path, and throws this error if nothing exists at that path. It never falls through to GitHub lookup for such inputs — the leading character is a deliberate signal that you meant a local directory.","triggerScenarios":"Running `install ./my-plugin` (or `/abs/path`, `~/path`) where the resolved directory does not exist — typo in the path, wrong working directory, plugin folder deleted/renamed, or passing a plugin *repository* root when the checker expects a plugin directory.","commonSituations":"Running from a different cwd than expected so a relative path resolves elsewhere; typo like `./plugn`; a plugin checked out under a different name; path pointing at a file instead of a directory.","solutions":["Verify the path exists: `ls -la <path>` — check for typos and that you are in the directory you think you are.","If you meant a GitHub plugin, drop the leading `.`/`/`/`~` and pass the plugin name (e.g. `compound-engineering`) so it resolves from the marketplace.","Pass an absolute path or `./`-relative path from your actual cwd.","Clone the plugin locally first if it is not on disk yet."],"exampleFix":"// before\ninstall ./compund-engineering\n// after\ninstall ./compound-engineering   # or: install compound-engineering (from GitHub)","handlingStrategy":"validation","validationCode":"import { existsSync } from \"fs\"\nconst p = input.startsWith(\"~\") ? input.replace(\"~\", process.env.HOME ?? \"\") : input\nif (input.startsWith(\".\") || input.startsWith(\"/\") || input.startsWith(\"~\")) {\n  if (!existsSync(p)) throw new Error(`Local path does not exist: ${p}`)\n}","typeGuard":null,"tryCatchPattern":"try {\n  await install(localPath)\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith(\"Local plugin path not found\")) {\n    console.error(`Path not found: ${localPath}. cwd=${process.cwd()}`)\n  } else throw e\n}","preventionTips":["Use absolute paths or ./ relative paths and `ls` them before installing.","Run the CLI from the directory you think you are in (check with pwd).","Don't prefix names with ./ or / unless the plugin is genuinely local — that disables GitHub lookup.","Point at the plugin directory, not its parent repo, when paths are nested."],"tags":["cli","filesystem","path-resolution"],"backgroundTag":"path-not-found","analyzedSha":"c9c10f8c75412c7232cb2bd663e5fd1cea98d84e","analyzedAt":"2026-08-31T15:18:07.959Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}