SyntaxFix
Write A Post
Hire A Developer
Questions
2020 Answer
With the release of node v14.14.0 you can now do.
v14.14.0
fs.rmSync("path/to/file", { force: true, });
https://nodejs.org/api/fs.html#fs_fs_rmsync_path_options