how to delete non empty directory in node js code example Example: delete dir nodejs fs.rmdirSync(dir, { recursive: true });