Fission-AI/OpenSpec · error · Error

OpenSpec config path exists but is not a file.

Error message

OpenSpec config path exists but is not a file.

What it means

Error "OpenSpec config path exists but is not a file." thrown in Fission-AI/OpenSpec.

Source

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

  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);

  if (yamlKind === 'file' || ymlKind === 'file') return;
  if (yamlKind !== 'missing' || ymlKind !== 'missing') {
    throw new Error('OpenSpec config path exists but is not a file.');
  }

  await FileSystemUtils.writeFile(
    configYamlPath,
    serializeConfig({ schema: DEFAULT_OPENSPEC_SCHEMA })
  );
  ledger.push({
    relativePath: relativeArtifact(OPENSPEC_CONFIG_YAML, 'file'),
    absolutePath: configYamlPath,
    kind: 'file',
  });
}

async function ensureDirectoryAnchor(
  storeRoot: string,
  relativeDir: string,
  ledger: CreatedPathLedgerEntry[]
): Promise<void> {

View on GitHub (pinned to 6926ccb18a)

When it happens

Trigger: Thrown at src/core/openspec-root.ts:260 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/ecd68f1521588eea. Report an issue: GitHub.