{"record":{"id":"79f619140be66ce8","repo":"Fission-AI/OpenSpec","slug":"cannot-create-openspec-config-yaml-for-language","errorCode":null,"errorMessage":"Cannot create openspec/config.yaml for --language${reason}","messagePattern":"Cannot create openspec/config\\.yaml for --language(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/init.ts","lineNumber":1068,"sourceCode":"    return formatLanguageContext(this.language);\n  }\n\n  private async assertLanguageCanBeApplied(\n    projectPath: string,\n    openspecPath: string\n  ): Promise<void> {\n    const languageContext = this.languageContext();\n    if (!languageContext) return;\n\n    const configPath = path.join(openspecPath, 'config.yaml');\n    const hasConfig = fs.existsSync(configPath) ||\n      fs.existsSync(path.join(openspecPath, 'config.yml'));\n    if (!hasConfig) {\n      try {\n        FileSystemUtils.assertProjectArtifactPath(projectPath, configPath);\n      } catch (error) {\n        const reason = error instanceof Error ? `: ${error.message}` : '';\n        throw new Error(`Cannot create openspec/config.yaml for --language${reason}`);\n      }\n      if (!(await FileSystemUtils.canWriteFile(configPath))) {\n        throw new Error(\n          'Cannot create openspec/config.yaml for --language: the destination is not writable.'\n        );\n      }\n      return;\n    }\n\n    const existingContext = readProjectConfig(projectPath)?.context;\n    if (existingContext?.includes(languageContext)) return;\n\n    throw new Error(\n      '--language does not overwrite an existing OpenSpec config. ' +\n      'Add the language instruction to its context field instead.'\n    );\n  }\n","sourceCodeStart":1050,"sourceCodeEnd":1086,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/init.ts#L1050-L1086","documentation":"Error \"Cannot create openspec/config.yaml for --language${reason}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/init.ts:1068 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"}