fs Error: ENOTEMPTY: directory not empty, rmdir code example Example: delete dir nodejs fs.rmdirSync(dir, { recursive: true });