Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yarn: How to upgrade yarn version using terminal?

How should yarn be upgraded to the latest version?

like image 234
Janaka Pushpakumara Avatar asked Apr 06 '18 09:04

Janaka Pushpakumara


People also ask

How do I update my yarn to a specific version?

info To upgrade, run the following command: $ brew upgrade yarn success Saved 0 new dependencies. Yes, running that will upgrade you to the latest version of yarn.

How do you upgrade yarn to v2?

Run npm install -g yarn to update the global yarn version to latest v1. Go into your project directory. Run yarn set version berry to enable v2 (cf Install for more details) If you used .


1 Answers

For macOS users, if you installed yarn via brew, you can upgrade it using the below command:

brew upgrade yarn

On Linux, just run the below command at the terminal:

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

On Windows, upgrade with Chocolatey

choco upgrade yarn

Credits: Added answers with the help of the below answers

  • https://stackoverflow.com/a/54147594/842607

  • https://stackoverflow.com/a/53710422/842607

like image 236
sonlexqt Avatar answered Oct 02 '22 20:10

sonlexqt