Runner Out of Disk During npm install (ENOSPC)
An npm install failed writing to disk. Large dependency trees plus the npm cache can fill a small runner disk, surfacing as ENOSPC mid-install.
What this error means
Install aborts with ENOSPC: no space left on device, write, often while extracting tarballs into node_modules. A fresh runner or a cache prune fixes it with no package.json change.
shell
npm error code ENOSPC
npm error syscall write
npm error errno -28
npm error nospc ENOSPC: no space left on device, writeCommon causes
node_modules plus the npm cache fill the disk
Large dependency trees and a growing ~/.npm cache consume space fast, especially on reused runners.
Leftover state from earlier jobs
Old node_modules, build outputs, and caches from prior steps leave little room for a clean install.
How to fix it
Reclaim space and prune the npm cache
Free room before installing.
shell
df -h
rm -rf node_modules
npm cache clean --force
npm ciInstall leaner or on a bigger disk
- Use
npm ci(clean, reproducible) over repeatednpm install. - Cache dependencies instead of keeping every install on the runner disk.
- Move heavy installs to a runner with a larger disk.
How to prevent it
- Prune
~/.npmperiodically on long-lived runners. - Right-size disk for projects with large dependency trees.
- Watch
df -hbefore and after install in CI.
Related guides
CI "No space left on device" (ENOSPC) on the RunnerFix "No space left on device" (ENOSPC) in CI when the runner disk fills with caches, layers, and artifacts. H…
tar: "write error: No space left on device" Restoring CacheFix "tar: write error: No space left on device" when CI restores a cache that outgrew the runner disk. How to…
CI /tmp Directory Full (ENOSPC on tmpfs)Fix ENOSPC from a full /tmp in CI. Temp files or a small tmpfs filled the temp directory. How to clear it, re…
CI "Disk quota exceeded" (EDQUOT) Writing FilesFix "Disk quota exceeded" (EDQUOT) in CI when a per-user or per-volume quota caps writes even with free space…