import fs from "fs-extra";
const dir = "test";
await fs.mkdir(dir);
await fs.rmdir("test", { recursive: true });
Output
(node:93995) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use `node --trace-deprecation ...` to show where the warning was created)
Describe the solution you'd like
Replace fs.rmdir with fs.rm API call
Example code which does not thrown runtime warning
import fs from "fs-extra";
const dir = "test";
await fs.mkdir(dir);
await fs.rm("test", { recursive: true });
Is your request related to a problem? Please describe.
This project uses fs.rmdir with
{ recursive: true }
which has been runtime deprecated since Node.js v16.0.0.Example code
Output
Describe the solution you'd like
Replace fs.rmdir with fs.rm API call
Example code which does not thrown runtime warning