【发布时间】:2019-02-27 20:38:46
【问题描述】:
我相信很久以前我从 npm 安装了 Yarn。但此后使用 brew 安装了最新版本。当我尝试将 Yarn 链接到 brew 的版本时,它仍然指向手动安装的版本。
如何让终端使用 brew 版本?
~ brew list --versions yarn
yarn 1.13.0
~ brew switch yarn 1.13.0
Cleaning /usr/local/Cellar/yarn/1.13.0
2 links created for /usr/local/Cellar/yarn/1.13.0
~ which yarn
/Users/lee/.yarn/bin/yarn
~ yarn --version
0.27.5
路径
/Users/lee/.yarn/bin:/usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/lee/Sites/AWS/ec2-api-tools-1.7.5.1/bin:/Users/lee/Sites/365TicketsGlobal/365tickets/data/scripts:/Users/lee/.composer/vendor/bin
运行 Yarn 命令
~ yarn
yarn install v0.27.5
(node:48263) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.03s.
【问题讨论】: