{"record":{"id":"ff8735b59f9f33dc","repo":"bmad-code-org/BMAD-METHOD","slug":"platform-codes-configuration-not-found-at-platf","errorCode":null,"errorMessage":"Platform codes configuration not found at: ${PLATFORM_CODES_PATH}","messagePattern":"Platform codes configuration not found at: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"tools/installer/ide/platform-codes.js","lineNumber":19,"sourceCode":"const fs = require('../fs-native');\nconst path = require('node:path');\nconst yaml = require('yaml');\n\nconst PLATFORM_CODES_PATH = path.join(__dirname, 'platform-codes.yaml');\n\nlet _cachedPlatformCodes = null;\n\n/**\n * Load the platform codes configuration from YAML\n * @returns {Object} Platform codes configuration\n */\nasync function loadPlatformCodes() {\n  if (_cachedPlatformCodes) {\n    return _cachedPlatformCodes;\n  }\n\n  if (!(await fs.pathExists(PLATFORM_CODES_PATH))) {\n    throw new Error(`Platform codes configuration not found at: ${PLATFORM_CODES_PATH}`);\n  }\n\n  const content = await fs.readFile(PLATFORM_CODES_PATH, 'utf8');\n  _cachedPlatformCodes = yaml.parse(content);\n  return _cachedPlatformCodes;\n}\n\n/**\n * Clear the cached platform codes (useful for testing)\n */\nfunction clearCache() {\n  _cachedPlatformCodes = null;\n}\n\n/**\n * Format the installable platform list for human-readable output (used by --list-tools).\n * Sourced from IdeManager so this view matches what --tools accepts at install time\n * (suspended platforms excluded).","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/bmad-code-org/BMAD-METHOD/blob/b70486b9bdcb0a404d329e2a763b57964e7f1360/tools/installer/ide/platform-codes.js#L1-L37","documentation":"Thrown by loadPlatformCodes when platform-codes.yaml (resolved next to the module via __dirname) does not exist on disk. This YAML is the source of truth for supported IDE platforms, their install targets, and suspension state; without it IdeManager cannot initialize.","triggerScenarios":"loadPlatformCodes() runs (typically via IdeManager.ensureInitialized → loadPlatformCodes) and fs.pathExists(PLATFORM_CODES_PATH) is false.","commonSituations":"A packaged/published installer build omitted platform-codes.yaml, a partial install of the installer itself, or the file was deleted/moved relative to platform-codes.js.","solutions":["Confirm the file sits beside platform-codes.js: `ls tools/installer/ide/platform-codes.yaml`.","Reinstall the BMAD installer package so all data files are present.","If vendoring the installer, ensure platform-codes.yaml is included in the package files list."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!(await fs.pathExists(require('path').join(__dirname, 'platform-codes.yaml')))) {\n  throw new Error('Installer data file missing. Reinstall the BMAD installer.');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await loadPlatformCodes();\n} catch (error) {\n  if (error.message.startsWith('Platform codes configuration not found')) { /* reinstall installer */ }\n  throw error;\n}","preventionTips":["Include platform-codes.yaml in the package `files` list when publishing.","Verify the installer payload integrity after install."],"tags":["ide","config","packaging","precondition"],"backgroundTag":null,"analyzedSha":"b70486b9bdcb0a404d329e2a763b57964e7f1360","analyzedAt":"2026-08-13T01:21:12.247Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}