pkg包安装
验证
> which node
/User//.nvm/versions/node//bin/node
> node -v
v10.16.3
pkg卸载
sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,share/man/*/node.*}
brew 安装node
brew search
> brew search node
==> Formulae
leafnode node-build node@8 nodenv
libbitcoin-node node-sass node_exporter
llnode node@10 nodebrew
node node@12 nodeenv
==> Casks
nodebox nodeclipse soundnode
安装
brew install node@12
// 建立软连接
> ln -s ~/.nvm/versions/node/ /usr/local/Cellar/
brew 卸载node
> brew uninstall node --ignore-dependencies
Error: No such keg: /usr/local/Cellar/node
解决方法:
brew uninstall node --force
nvm 安装node
brew install nvm
brew install n