[英]installing particular version of node with homebrew is giving error
我需要安装节点版本10,并遵循以下步骤
上面的命令给出了错误,因此尝试了
现在我出错了
If you need to have this software first in your PATH instead consider running:
echo 'export PATH="/usr/local/opt/node@10/bin:$PATH"' >> ~/.bash_profile
我已经检查了.bash_profile,并且上面的条目确实存在,但没有得到为什么上面的错误一直在显示?
我相信您仍在运行旧版本的节点。 首先,假定已安装节点8,请尝试使用brew uninstall node@8
卸载它。
然后
brew uninstall --ignore-dependencies --force node
brew uninstall --ignore-dependencies --force icu4c
brew install icu4c
brew unlink icu4c && brew link icu4c --force
brew install node@10
几天前,我遇到了同样的问题,并且发现此博客文章对您有所帮助: Mac Brew Node 10升级
正如@quentin所评论的那样,这不是错误,而是参考消息。
其次,我更喜欢使用软件包n
安装特定版本的Node。 https://www.npmjs.com/package/n
最初,您获得安装的节点的默认版本。 然后使用n
来处理Node版本。
安装n- $ npm install -gn
安装节点10- $ n 10
安装节点稳定- $ n stable
最新安装节点- $ n latest
安装节点lts- $ n lts
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.