How do you update "yarn" to the latest version, 1.13.0?
The question shows that yarn has been upgraded with npm install yarn -g
to 1.13.0 but the yarn command is still showing an older version
D:\test>yarn -v
1.12.3
The most likely problem is because the executed yarn version is as expected, C:\Users\myuser\AppData\Roaming\npm\yarn
. Check which version of yarn you are invoking with
D:\test>where yarn
Upgrading Yarn
@Whatatimetobealive's answer is the best option to upgrade yarn. If for some reason you cannot use choco
, brew
, npm
or your package manager to install yarn, you can try using yarn
itself.
$ yarn global add yarn
Unfortunately we cannot use yarn to update itself until the yarn self-update
command is fixed.
There is a known bug on npm update yarn -g
here is the related GitHub issue so you should use this instead:
npm install -g yarn
Alternatively, you can install brew
first than update trough brew
like this:
brew upgrade yarn
If you're using Windows you can find a brew
alternative, such as choco
, and update with like this:
choco upgrade yarn