我的解决办法是文章末尾的brew update && brew upgrade
一行命令解决的,前边的可以跳过不看。
要解决的问题:
—————————————————————
执行brew upgrade npm
没用!
继续......
—————————————————————
brew update
没用!
继续.......
—————————————————————
brew info icu4c
然后
cd /usr/local/Cellar/icu4c/66.1/lib
cp ./libicui18n.66.dylib /usr/local/opt/icu4c/lib/
提示
附注Linux
cp
命令
没用!
继续......
—————————————————————
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
如图
然后1、
rm -rf /usr/local/lib/node_modules/npm
,再2、brew link node
在第二步报错
然后我执行了
brew unlink node@12
重新尝试
brew link node
,输出了Linking /usr/local/Cellar/node/14.3.0... 204 symlinks created
但,还是没有解决掉我的问题!
继续......
—————————————————————
brew update && brew upgrade
庆祝
踏破铁鞋无觅处,蓦然回首,那人却在灯火阑珊处
兜兜转转,这一行命令就解决了问题