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, write
Common 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.
Use npm ci (clean, reproducible) over repeated npm 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 ~/.npm periodically on long-lived runners.
Right-size disk for projects with large dependency trees.
Watch df -h before and after install in CI.
Frequently asked questions
What causes "npm install out of disk"?
Large dependency trees and a growing ~/.npm cache consume space fast, especially on reused runners.
How do I fix npm install out of disk?
Free room before installing.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.