EEXIST in Node.js — What It Means and How to Fix It

What the Node.js/npm error EEXIST means and how to resolve it.

Published October 26, 2026

EEXIST means an operation (like creating a file or directory) failed because the target already exists.

Key points

  • Common when using fs.mkdirSync() without the { recursive: true } option on a directory that's already there
More JavaScript articles