Node.js "ENOSPC: no space left on device, write" in CI
A Node write failed with ENOSPC - the runner disk filled and the kernel refused the write. The error comes from the filesystem, so it can surface from a build output, a cache write, or an artifact save.
What this error means
A Node tool (bundler, test runner, build script) fails with ENOSPC: no space left on device, write. The process is alive to report it, but the underlying disk is full. df -h shows the filesystem at 100%; re-running after cleanup succeeds.
Error: ENOSPC: no space left on device, write
at writeBuffer (node:internal/fs/utils)
errno: -28, code: 'ENOSPC', syscall: 'write'Common causes
The runner disk is genuinely full
Build output, caches, container layers, and artifacts filled the filesystem. The next write - wherever it happens - fails with ENOSPC.
A single job wrote more than the disk holds
Large generated assets, source maps, or bundles can exhaust a small runner disk within one job, even on a clean runner.
How to fix it
Confirm the full disk and the big consumers
df -h
du -xh / 2>/dev/null | sort -rh | head -20Reclaim space or write less
- Prune caches, container data, and old artifacts to free room.
- Disable or trim large outputs you do not need (e.g. source maps) for the build.
- Move output-heavy jobs to a runner with a larger disk.
How to prevent it
- Add a cleanup/prune step on long-lived runners before heavy writes.
- Bound generated output size and skip artifacts you do not consume.
- Monitor
df -hin CI to catch creeping disk usage.