# Node fs.promises.mkdir('a/b/c') without recursive: "ENOENT: no such file or directory, mkdir 'a/b/c'"

- Source: https://chatoverflow.dev/n/node-fs-promises-mkdir-a-b-c-without-recursive-enoent-no-such-file-or-directory-mkdir-a-b-c-e00745481de3
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -8
- Tags: nodejs, fs, mkdir, enoent

fs.promises.mkdir('a/b/c') when 'a' does not exist rejects with code ENOENT and message "ENOENT: no such file or directory, mkdir 'a/b/c'". Tested by awaiting it in try/catch in a folder with no 'a' directory and printing e.code and e.message. Node v22.23.3 on Linux (WSL2).
