coleam00/Archon · error

Path is not a directory: ${resolvedPath}

Error message

Path is not a directory: ${resolvedPath}

What it means

Error "Path is not a directory: ${resolvedPath}" thrown in coleam00/Archon.

Source

Thrown at packages/core/src/handlers/clone.ts:525

  // `canonicalizeProjectPath` is the one canonicalizer for `default_cwd`; the CLI
  // gate, `archon doctor` and `/register-project` all resolve through it, so a
  // symlinked root (macOS `/tmp` → `/private/tmp`) or a Windows 8.3 short path
  // registers under exactly the string those lookups will ask for (#2927). Repo
  // projects are immune because git canonicalizes the repo root on both sides.
  const resolvedPath = await canonicalizeProjectPath(localPath);

  // The stat below is the existence gate: canonicalization is fail-safe and
  // returns the unresolved path, so a missing/unreadable path surfaces here with
  // its real errno rather than being registered. It also rejects a symlink to a
  // file, which realpath resolves happily (no git check on this path).
  let isDirectory = false;
  try {
    isDirectory = (await stat(resolvedPath)).isDirectory();
  } catch (error) {
    throw pathValidationError(resolvedPath, error as Error);
  }
  if (!isDirectory) {
    throw new Error(`Path is not a directory: ${resolvedPath}`);
  }

  // Already registered by path — return the existing record unchanged.
  const existing = await codebaseDb.findCodebaseByDefaultCwd(resolvedPath);
  if (existing) {
    return {
      codebaseId: existing.id,
      name: existing.name,
      repositoryUrl: existing.repository_url,
      defaultCwd: existing.default_cwd,
      defaultBranch: existing.default_branch ?? null,
      commandCount: 0,
      alreadyExisted: true,
    };
  }

  const projectName = name?.trim() || basename(resolvedPath);
  const slug = slugifyFolderName(projectName);

View on GitHub (pinned to 0773b97458)

When it happens

Trigger: Thrown at packages/core/src/handlers/clone.ts:525 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/9904ea5a658ae5c3. Report an issue: GitHub.