You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On NodeJS 14, the code runs successfully, while on NodeJS 16 it fails with the following error: SystemError: Path is a directory: rm returned EISDIR (is a directory) path/source
The text was updated successfully, but these errors were encountered:
I tested fs.rm with force:true without mock-fs, nodejs v14.18.1 returns same error as nodejs v17.1.0. You have to use recursive:true for any rm(folder). It's understandable, as fs.rm is modeled on the standard POSIX rm utility (rm -r dir).
(node:46582) UnhandledPromiseRejectionWarning: SystemError [ERR_FS_EISDIR]: Path is a directory: rm returned EISDIR (is a directory) a
What nodejs v14 version were you using?
(I found another issue related to file permission when testing fs.rm with mock-fs, working on it.)
The following code behaves differently on NodeJS 16 and NodeJS 14:
On NodeJS 14, the code runs successfully, while on NodeJS 16 it fails with the following error:
SystemError: Path is a directory: rm returned EISDIR (is a directory) path/source
The text was updated successfully, but these errors were encountered: