yarnのcacheでハマった
1403 ワード
めったに起こらないエラーだと思うがyarnのキャッシュでハマった。同じ地雷を踏む人がいないとも限らないので書いておく。
ローカルで開発していたjavascriptのライブラリを
yarn add javascriptのライブラリのパス
でreactに追加して開発をしていたらyarn addの際に以下のエラーが出るようになった。
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
error An unexpected error occurred: "ENOSPC: no space left on device, write".
info If you think this is a bug, please open a bug report with the information provided in "ライブラリのパス/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
no space left on device
のエラーメッセージを検索するとメモリの問題だったりinodeの問題のケースもあるみたいだが、今回はディスク容量の問題で、いつの間にか何かが400GB以上、ディスク容量圧迫していて他の作業もまともに進まなくなった。
このmacについて→ストレージ
を開いて確認するも「その他」の領域のファイルが圧迫していることしかわからない(具体的なパスが出ない)
原因と解決
findとduコマンドで地道に調べていったところ以下のパスにyarnのcacheがたまっていた
$HOME/Library/Caches/Yarn/
開発していたライブラリのパスで
yarn cache clean
を実行して解決。
Author And Source
この問題について(yarnのcacheでハマった), 我々は、より多くの情報をここで見つけました https://qiita.com/yikegaya/items/08933c1cbd0ea990ced3著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .