removeSync() does not error if file to remove exists, but is not writable.
See original GitHub issue- Operating System:
- macOS 11.3.1
- Ubuntu 16.04.6 LTS
- Node.js version:
- 16.1.0
- 16.0.0
- 14.16.1
fs-extra
version:- 10.0.0
Starting with fs-extra 10.0.0 on node 14.14+, failures to rm a file that exists, but is in an unwritable directory, fail silently. fs-extra 9.1.0 throws an error, and fs-extra on node 12 throw an error.
Note that fs.rm in node 14.14+ is documented to fail silently only if the force
parameter is true and the file to delete does not exist.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Unable to delete file using fs.removeSync() - node.js
Based on node.js documentation removeSync function not exist. For delete file use unlinkSync function like this: fs.unlinkSync(path). But I ...
Read more >Node.js: fs-extra - npm
This module adds a few extra file system methods that aren't included in the native fs ... If the directory does not exist,...
Read more >Understanding Deno's file system - LogRocket Blog
If you try to write to a file that does not exist, ... To remove files in Deno, use either the remove or...
Read more >GlasgowGuideApp/node_modules/fs-extra/CHANGELOG.md ...
Fix bug in move() & moveSync() when source and destination are the same, ... option for readJsonSync() ; now does not throw filesystem...
Read more >Node.js: fs-extra - File Transfer Service ... - CERN GitLab
ensureDir(dir, callback). Ensures that the directory exists. If the directory structure does not exist, it is created. Sync: ensureDirSync(). Example:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just submitted nodejs/node#38683 as Node does have this bug also.
Closing as
wontfix
, since this is an upstream bug in Node. Node just merged a fix for this: https://github.com/nodejs/node/pull/38684; from what I can tell, we should expect that fix to land in Node v17.