ENOSPC in Node.js — What It Means and How to Fix It
What the Node.js/npm error ENOSPC means and how to resolve it.
Published October 26, 2026
ENOSPC means 'no space', either disk is full or, commonly on Linux, the inotify file-watcher limit is too low for tools like webpack and Jest.
What it means and why it happens
Large projects exceed the default watch limit.
Read the full message: it names the file and line where the problem was detected, which is the best place to start.
What you see
run the code
Error: ENOSPC: System limit for number of file watchers reached
Practical examples
Code that triggers it
npm start # ENOSPC on a big repoThe fix
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -pCheck disk space too
df -h
du -sh node_modulesCommon mistakes
- Assuming the disk is full.
- Watching node_modules.
- Not persisting the sysctl change.
Key takeaways
- ENOSPC: ENOSPC means 'no space', either disk is full or, commonly on Linux, the inotify file-watcher limit is too low for tools like webpack and Jest.
- Read the message and the line number first.
- Fix the cause, don't just silence the error.
FAQ
How many watches?
524288 is a common value for development machines.
How do I find which line caused ENOSPC?
The error message and stack trace show the file and line; start there and work backwards.