npm

ENOENT: no such file or directory

ENOENT: No Such File or Directory

A file or directory referenced in the command or script doesn't exist.

Common Causes

Fixes

  1. 1. Verify path exists
    ls -la path/to/file
  2. 2. Use absolute paths in scripts
    const path = require('path');
    const fullPath = path.join(__dirname, 'file.txt');
  3. 3. Create missing directory
    mkdir -p dist && npm run build

Still not fixed?

Related Errors

DuskTools That Might Help

All Errors