bmad-code-org/BMAD-METHOD · error · Error
${label}: no space left on device: ${dirPath}
Error message
${label}: no space left on device: ${dirPath} What it means
Thrown by ensureWritableDir when fs.ensureDir fails with ENOSPC — the filesystem is out of space. Distinct from permission errors so the user knows the volume is full.
Source
Thrown at tools/installer/core/install-paths.js:120
} 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}`);
}
throw new Error(`${label}: cannot create directory: ${dirPath} (${error.message})`);
}
try {
await fs.access(dirPath, fs.constants.R_OK | fs.constants.W_OK);
} catch {
throw new Error(`${label} is not writable: ${dirPath}`);
}
}
module.exports = { InstallPaths };
View on GitHub (pinned to b70486b9bd)
Solutions
- Free space on the target volume: remove unneeded files.
- Choose a target directory on a filesystem with free space.
- If under a quota, raise the quota or clean up to comply.
Defensive patterns
Strategy: validation
Validate before calling
import { statfs } from 'node:fs/promises';
const info = await statfs(targetParent).catch(() => null);
// inspect free blocks before attempting a large install Try / catch
try {
await ensureWritableDir(dirPath, label);
} catch (error) {
if (error.message.includes('no space left on device')) { /* free space or relocate */ }
throw error;
} Prevention
- Check free disk space before running a multi-module install.
- Run installs on volumes with adequate headroom.
When it happens
Trigger: InstallPaths.create() invokes ensureDir for the project root or _bmad subdirectories and the underlying disk/volume has no free blocks/inodes.
Common situations: Full disk, exhausted inode table, or a quota-limited filesystem.
Related errors
- ${label} does not exist: ${dirPath}
- ${label} is not a directory: ${dirPath}
- ${label} is not readable: ${dirPath}
- ${label} does not exist: ${filePath}
- ${label} is not a file: ${filePath}
AI-assisted analysis of bmad-code-org/BMAD-METHOD@b70486b9bd (2026-08-13).
Data as JSON: /api/errors/b04c6d14f240934c.
Report an issue: GitHub.