我的解決辦法是文章末尾的brew update && brew upgrade一行命令解決的,前邊的可以跳過不看。
要解決的問題:

image.png
—————————————————————
執(zhí)行brew upgrade npm

image.png
沒用!
繼續(xù)......
—————————————————————
brew update
沒用!
繼續(xù).......
—————————————————————
brew info icu4c

image.png
然后
cd /usr/local/Cellar/icu4c/66.1/libcp ./libicui18n.66.dylib /usr/local/opt/icu4c/lib/提示

image.png
附注Linux
cp命令
image.png
沒用!
繼續(xù)......
—————————————————————
brew reinstall yarn
有報錯
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/doc/node/gdbinit
Target /usr/local/share/doc/node/gdbinit
is a symlink belonging to node@12. You can unlink it:
brew unlink node@12
如圖

image.png
然后1、
rm -rf /usr/local/lib/node_modules/npm,再2、brew link node在第二步報錯

image.png
然后我執(zhí)行了
brew unlink node@12重新嘗試
brew link node,輸出了Linking /usr/local/Cellar/node/14.3.0... 204 symlinks created但,還是沒有解決掉我的問題!
繼續(xù)......
—————————————————————
brew update && brew upgrade??

image.png
慶祝??????????
踏破鐵鞋無覓處,驀然回首,那人卻在燈火闌珊處
兜兜轉(zhuǎn)轉(zhuǎn),這一行命令就解決了問題??