isaacs / rimraf

A `rm -rf` util for nodejs
ISC License
5.62k stars 250 forks source link

Continue after ENOENT: no such file or directory #305

Closed basickarl closed 3 months ago

basickarl commented 4 months ago

I get this error when a directory doesn't exist that I am trying to remove. Would be good with a flag so that the command can skip this and go to the next file/directory in the list.

ENOENT: no such file or directory

isaacs commented 4 months ago

How are you getting rimraf to raise an ENOENT? That shouldn't be possible, when it encounters an ENOENT it just returns successfully. Can you share some code to reproduce it?

basickarl commented 4 months ago

Ah, I see you have been updating the package. Something is whack:

karl ~/development/neo/needle-3 [fix-playwright-install] $ npx --yes rimraf@5.0.5 .yarn/cache
karl ~/development/neo/needle-3 [fix-playwright-install] $ npx --yes rimraf .yarn/cache 
sh: rimraf: command not found

First one works. second one crashes.

isaacs commented 4 months ago

Probably you need to update your rimraf dep. what does npm ls rimraf output?