bmad-code-org/BMAD-METHOD · critical · Error
Platform codes configuration not found at: ${PLATFORM_CODES_
Error message
Platform codes configuration not found at: ${PLATFORM_CODES_PATH} What it means
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.
Source
Thrown at tools/installer/ide/platform-codes.js:19
const fs = require('../fs-native');
const path = require('node:path');
const yaml = require('yaml');
const PLATFORM_CODES_PATH = path.join(__dirname, 'platform-codes.yaml');
let _cachedPlatformCodes = null;
/**
* Load the platform codes configuration from YAML
* @returns {Object} Platform codes configuration
*/
async function loadPlatformCodes() {
if (_cachedPlatformCodes) {
return _cachedPlatformCodes;
}
if (!(await fs.pathExists(PLATFORM_CODES_PATH))) {
throw new Error(`Platform codes configuration not found at: ${PLATFORM_CODES_PATH}`);
}
const content = await fs.readFile(PLATFORM_CODES_PATH, 'utf8');
_cachedPlatformCodes = yaml.parse(content);
return _cachedPlatformCodes;
}
/**
* Clear the cached platform codes (useful for testing)
*/
function clearCache() {
_cachedPlatformCodes = null;
}
/**
* Format the installable platform list for human-readable output (used by --list-tools).
* Sourced from IdeManager so this view matches what --tools accepts at install time
* (suspended platforms excluded).View on GitHub (pinned to b70486b9bd)
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.
Defensive patterns
Strategy: validation
Validate before calling
if (!(await fs.pathExists(require('path').join(__dirname, 'platform-codes.yaml')))) {
throw new Error('Installer data file missing. Reinstall the BMAD installer.');
} Try / catch
try {
await loadPlatformCodes();
} catch (error) {
if (error.message.startsWith('Platform codes configuration not found')) { /* reinstall installer */ }
throw error;
} Prevention
- Include platform-codes.yaml in the package `files` list when publishing.
- Verify the installer payload integrity after install.
When it happens
Trigger: loadPlatformCodes() runs (typically via IdeManager.ensureInitialized → loadPlatformCodes) and fs.pathExists(PLATFORM_CODES_PATH) is false.
Common situations: 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.
Related errors
- All selected tool(s) are suspended: ${suspendedIdes.join(',
- Shared scripts source directory not found: ${srcScriptsDir}
- ${label} does not exist: ${dirPath}
- ${label} is not a directory: ${dirPath}
- ${label} is not readable: ${dirPath}
AI-assisted analysis of bmad-code-org/BMAD-METHOD@b70486b9bd (2026-08-13).
Data as JSON: /api/errors/ff8735b59f9f33dc.
Report an issue: GitHub.