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


当前回答

npm i -g yarn

这应该会更新你的纱线版本。用yarn -v或yarn——version检查version。

其他回答

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

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

根据https://yarnpkg.com/getting-started/install#updating-to-the-latest-versions

yarn set version <version>

例如,将yarn v1.22.4升级到v1.22.10:

yarn set version 1.22.10

Yarn策略集

在powershell中使用上述命令将当前的yarn版本升级到最新。它将下载最新的纱线版本

Yarn策略集

是否下载最新的稳定版本

参考yarn文档 https://yarnpkg.com/lang/en/docs/cli/policies/#toc-policies-set-version

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

这应该有用。