なぜか急にyarn install
やyarn add
ができなくなった。
→ yarn cache clear
でcacheクリアしたらできるようになった。
yarn install/addができない
$ yarn install
yarn install v1.22.10
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
error Command failed.
Exit code: 1
Command: git
Arguments: pull
Directory: /Users/xxx/Library/Caches/Yarn/v6/.tmp/e435b7ca0cb96f2553222bc619c5b701
Output:
Your configuration specifies to merge with the ref 'refs/heads/ng-new'
from the remote, but no such ref was fetched.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
$ yarn add bootstrap-icons
yarn add v1.22.10
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
error Command failed.
Exit code: 1
Command: git
Arguments: pull
Directory: /Users/xxx/Library/Caches/Yarn/v6/.tmp/e435b7ca0cb96f2553222bc619c5b701
Output:
Your configuration specifies to merge with the ref 'refs/heads/ng-new'
from the remote, but no such ref was fetched.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
remoteブランチを確認してみると確かにない
$ git ls-remote origin | grep ng-new
# なし
cacheクリアしてみる
$ yarn cache clean
yarn cache v1.22.10
success Cleared cache.
✨ Done in 30.85s.
yarn installできたー
!!!
$ yarn install
yarn install v1.22.10
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
✨ Done in 35.10s.