bmad-code-org/BMAD-METHOD · error · Error
${label} is not readable: ${filePath}
Error message
${label} is not readable: ${filePath} What it means
Thrown by assertReadableFile when the file exists and is a regular file but fs.access with R_OK fails — the process cannot read it. Isolates a pure permission problem on a file.
Source
Thrown at tools/installer/core/install-paths.js:103
try {
await fs.access(dirPath, fs.constants.R_OK);
} catch {
throw new Error(`${label} is not readable: ${dirPath}`);
}
}
async function assertReadableFile(filePath, label) {
const stat = await fs.stat(filePath).catch(() => null);
if (!stat) {
throw new Error(`${label} does not exist: ${filePath}`);
}
if (!stat.isFile()) {
throw new Error(`${label} is not a file: ${filePath}`);
}
try {
await fs.access(filePath, fs.constants.R_OK);
} catch {
throw new Error(`${label} is not readable: ${filePath}`);
}
}
async function ensureWritableDir(dirPath, label) {
const stat = await fs.stat(dirPath).catch(() => null);
if (stat && !stat.isDirectory()) {
throw new Error(`${label} exists but is not a directory: ${dirPath}`);
}
try {
await fs.ensureDir(dirPath);
} catch (error) {
if (error.code === 'EACCES') {
throw new Error(`${label}: permission denied creating directory: ${dirPath}`);
}
if (error.code === 'ENOSPC') {
throw new Error(`${label}: no space left on device: ${dirPath}`);
}View on GitHub (pinned to b70486b9bd)
Solutions
- Make the file readable: `chmod +r <filePath>`.
- Run the installer as the file owner.
- Adjust container/sandbox mount options to permit reads.
Defensive patterns
Strategy: validation
Validate before calling
await fs.access(filePath, fs.constants.R_OK);
Try / catch
try {
await assertReadableFile(filePath, label);
} catch (error) {
if (error.message.includes('is not readable')) { /* fix perms */ }
throw error;
} Prevention
- Ensure required files are world-readable in packaged builds.
- Run install as a user with read access to the source tree.
When it happens
Trigger: assertReadableFile runs against package.json (or another required file) and the OS denies read access to the current user.
Common situations: File owned by another user with no world-read bit, restrictive umask, or a sandboxed environment that masks the file.
Related errors
- ${label} is not readable: ${dirPath}
- ${label}: permission denied creating directory: ${dirPath}
- ${label} is not writable: ${dirPath}
- ${label} does not exist: ${dirPath}
- ${label} is not a directory: ${dirPath}
AI-assisted analysis of bmad-code-org/BMAD-METHOD@b70486b9bd (2026-08-13).
Data as JSON: /api/errors/819fc6eecda55c94.
Report an issue: GitHub.