error An unexpected error occurred: "ENOTEMPTY: directory not empty, rmdir '/app/node_modules/.bin'".
info If you think this is a bug, please open a bug report with the information provided in "/app/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
状況
- ReactコンテナをDocker composeで立ち上げ、yarn installを実行
- 途中で止まる&エラーが出て失敗(エラー文は↑)
環境
windows10 21H2
Docker Desktop 4.12.0
対処法
ローカルのnode_modulesを削除してから再度実行する
エラー文から、ディレクトリが空ではないことが原因だと読み取れたので、ローカルのnode_modulesを削除
その後yarn installを実行すると成功(しかしとてつもなく遅い・・・・)
参考