我需要安装节点版本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和上面的条目确实存在,而不是为什么上面的错误继续显示?
发布于 2018-10-29 10:58:49
正如@quentin所评论的,这不是一个错误,而是一条信息消息。
其次,我更喜欢使用包n来安装特定版本的Node。https://www.npmjs.com/package/n
最初,您将安装节点的默认版本。然后使用n来处理Node版本。
安装n- $ npm install -g n
安装节点10 - $ n 10
安装节点稳定- $ n stable
安装节点最新- $ n latest
安装节点lts - $ n lts
发布于 2018-10-29 10:51:50
我相信您仍然在运行旧的节点版本。首先,假设节点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几天前,我也遇到了同样的问题,我发现这篇博客文章很有帮助:10升级
https://stackoverflow.com/questions/53043476
复制相似问题