Fission-AI/OpenSpec · error · Error

${relativePath}/ exists but is not a directory.

Error message

${relativePath}/ exists but is not a directory.

What it means

Error "${relativePath}/ exists but is not a directory." thrown in Fission-AI/OpenSpec.

Source

Thrown at src/core/openspec-root.ts:238

  inspection.healthy =
    inspection.present === true &&
    inspection.config.present === true &&
    inspection.diagnostics.length === 0;

  return inspection;
}

async function ensureDirectory(
  storeRoot: string,
  relativePath: string,
  ledger: CreatedPathLedgerEntry[]
): Promise<void> {
  const absolutePath = path.join(storeRoot, relativePath);
  const kind = await pathKind(absolutePath);

  if (kind === 'directory') return;
  if (kind !== 'missing') {
    throw new Error(`${relativePath}/ exists but is not a directory.`);
  }

  await fs.mkdir(absolutePath, { recursive: true });
  ledger.push({
    relativePath: relativeArtifact(relativePath, 'directory'),
    absolutePath,
    kind: 'directory',
  });
}

async function ensureDefaultConfig(
  storeRoot: string,
  ledger: CreatedPathLedgerEntry[]
): Promise<void> {
  const configYamlPath = path.join(storeRoot, OPENSPEC_CONFIG_YAML);
  const configYmlPath = path.join(storeRoot, OPENSPEC_CONFIG_YML);
  const yamlKind = await pathKind(configYamlPath);
  const ymlKind = await pathKind(configYmlPath);

View on GitHub (pinned to 6926ccb18a)

When it happens

Trigger: Thrown at src/core/openspec-root.ts:238 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25). Data as JSON: /api/errors/8e9f135e2baf0f19. Report an issue: GitHub.