【发布时间】:2018-08-20 23:13:57
【问题描述】:
我尝试过使用
brew install yarn@1.7.0 --without-node
或
brew install yarn@1.7.x --without-node
但我收到以下错误
Error: No available formula with the name "yarn@1.7.0"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
我认为可以使用 brew 安装不同版本的纱线?
【问题讨论】:
-
你为什么不用npm?
npm install yarn@1.7.0 -
@MuhFred 你肯定是想添加
-g吗?不管it's not recommended -
npm如果您使用nvm并希望全局安装 yarn,无论哪个版本的节点恰好在任何给定时刻处于活动状态,这都不是一个好的选择。