Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ENOTEMPTY directory not empty, rmdir: npm-react-popper-tooltip

I am not a frontend developer but sometimes I have to run some tasks like yarn install && yarn build-dev. Currently I am running just yarn install as shown below but I can not get it to work properly and have no clues on what is wrong or how to fix it:

▶ yarn install
yarn install v1.22.4
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error An unexpected error occurred: "ENOTEMPTY: directory not empty, rmdir '/Users/reynierpm/Library/Caches/Yarn/v6/npm-react-popper-tooltip-2.10.1-e10875f31916297c694d64a677d6f8fa0a48b4d1-integrity/node_modules/react-popper-tooltip'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/reynierpm/dev/docker/web/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
warning [email protected]: Invalid bin field for "mini-css-extract-plugin".

What I have tried so far?

  • Google for some solutions
  • a few SO post solutions
  • Delete the content of the directory using rm -rf
  • Clear yarn cache yarn cache clean

None of them worked. What could be wrong here?

I am using MacOS Catalina 10.15.4 and the command was run from iTerm2 using ZSH.

like image 775
ReynierPM Avatar asked Oct 26 '22 23:10

ReynierPM


1 Answers

I had the same issue but these options helped me

  • Make sure you don't have file explore open on that folder
  • Make sure you don't have nodemon running
  • Make sure you don't have live-server-extension in your IDE (like visual studio) running
  • Make sure you don't have any live process that is currently using your app directory
like image 132
Ntwari Clarance Liberiste Avatar answered Nov 09 '22 06:11

Ntwari Clarance Liberiste