如何用Homebrew的节点替换我的node版本?
我已安装此版本的节点
localhost:pplsi.accounts davea$ node -v
v10.16.3
localhost:mydir davea$ which node
/usr/local/bin/node
我更喜欢使用自制版本,所以我尝试了
localhost:mydir davea$ brew upgrade node
Updating Homebrew...
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
==> Auto-updated Homebrew!
Updated 3 taps (phinze/cask, homebrew/core and homebrew/cask).
==> Updated Formulae
rabbitmq
Error: node 12.10.0 already installed
但是我的节点仍然显示为旧版本
localhost:pplsi.accounts davea$ node -v
v10.16.3
如何用已安装的自制软件替换节点?
回答如下:可能是brew安装的节点不在路径中,将/ usr / local / bin文件夹添加到路径并尝试。
export PATH="/usr/local/bin:$PATH"