DEP0147: fs.rmdir(path, { recursive: true })


类型:寿命终止

🌐 Type: End-of-Life

fs.rmdirfs.rmdirSyncfs.promises.rmdir 方法曾经支持 recursive 选项。该选项已被移除。

🌐 The fs.rmdir, fs.rmdirSync, and fs.promises.rmdir methods used to support a recursive option. That option has been removed.

请使用 fs.rm(path, { recursive: true, force: true })fs.rmSync(path, { recursive: true, force: true })fs.promises.rm(path, { recursive: true, force: true })

🌐 Use fs.rm(path, { recursive: true, force: true }), fs.rmSync(path, { recursive: true, force: true }) or fs.promises.rm(path, { recursive: true, force: true }) instead.

提供了自动迁移(来源):

🌐 An automated migration is available (source):

npx codemod@latest @nodejs/rmdir