纱线应该如何升级到最新版本?


当前回答

因为你已经安装了yarn,只想升级/更新。你可以简单地使用 纱的由来 请在这里找到参考资料https://yarnpkg.com/en/docs/cli/self-update

其他回答

如果您想将您的yarn版本从1.22.5升级到1.22.10

Yarn策略集

在Linux操作系统中,只需在终端运行以下命令:

$ curl --compressed -o- -L https://yarnpkg.com/install.sh | bash

在此之后,关闭当前终端并再次打开它。然后,执行以下命令检查纱线当前版本:

$ yarn --version

NPM install -g yarn -解决了运行NPM update -global yarn时什么都没有发生的问题。

更新纱线的替代方法:curl——compressed -o- l https://yarnpkg.com/install.sh | bash。

使用自制程序的Mac用户可以运行brew upgrade yarn。

更多细节在这里和这里。

这个工作为我改变纱线版本0.32 git到1.22.5

https://www.codegrepper.com/code-examples/shell/yarn+0.32+git+ubuntu

npm install --global yarn
npm upgrade --global yarn 

这应该有用。