{"record":{"id":"ecd68f1521588eea","repo":"Fission-AI/OpenSpec","slug":"openspec-config-path-exists-but-is-not-a-file","errorCode":null,"errorMessage":"OpenSpec config path exists but is not a file.","messagePattern":"OpenSpec config path exists but is not a file\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/core/openspec-root.ts","lineNumber":260,"sourceCode":"  ledger.push({\n    relativePath: relativeArtifact(relativePath, 'directory'),\n    absolutePath,\n    kind: 'directory',\n  });\n}\n\nasync function ensureDefaultConfig(\n  storeRoot: string,\n  ledger: CreatedPathLedgerEntry[]\n): Promise<void> {\n  const configYamlPath = path.join(storeRoot, OPENSPEC_CONFIG_YAML);\n  const configYmlPath = path.join(storeRoot, OPENSPEC_CONFIG_YML);\n  const yamlKind = await pathKind(configYamlPath);\n  const ymlKind = await pathKind(configYmlPath);\n\n  if (yamlKind === 'file' || ymlKind === 'file') return;\n  if (yamlKind !== 'missing' || ymlKind !== 'missing') {\n    throw new Error('OpenSpec config path exists but is not a file.');\n  }\n\n  await FileSystemUtils.writeFile(\n    configYamlPath,\n    serializeConfig({ schema: DEFAULT_OPENSPEC_SCHEMA })\n  );\n  ledger.push({\n    relativePath: relativeArtifact(OPENSPEC_CONFIG_YAML, 'file'),\n    absolutePath: configYamlPath,\n    kind: 'file',\n  });\n}\n\nasync function ensureDirectoryAnchor(\n  storeRoot: string,\n  relativeDir: string,\n  ledger: CreatedPathLedgerEntry[]\n): Promise<void> {","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/openspec-root.ts#L242-L278","documentation":"Error \"OpenSpec config path exists but is not a file.\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/openspec-root.ts:260 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-08-25T16:17:27.014Z"}