Yarn: Yarn 0.20.3 reports as 0.19.1 on Windows using MSI

Created on 16 Feb 2017  Â·  16Comments  Â·  Source: yarnpkg/yarn

I thought I was having problems updating Yarn, so I uninstalled the version I had on my machine, installed the new one from the MSI but the version number seems to be incorrect via the CLI.

yarn

Most helpful comment

I did find one in the old self-update folder that apparently wasn't cleaned up on uninstall. Uninstalling, deleting that folder (well, the entire %ProgramFilesx86%/Yarn folder), and reinstalling fixed the version issue, @Daniel15.

All 16 comments

That is strange.
Could you run self-update at some point?
In that case the self-updated location would override it

Command 'self-update' not found. I take it then that the installation is incorrect, or something?

Try uninstalling it completely.
And installing again

On 16 February 2017 at 15:24, Chris Paton notifications@github.com wrote:

Command 'self-update' not found. I take it then that the installation is
incorrect, or something?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/yarnpkg/yarn/issues/2706#issuecomment-280361069, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACBdWKWGv5TeV5TbOWRz8dZba79cFiVRks5rdGpJgaJpZM4MDIuM
.

I did. Checked the installation directory and all gone. Wouldn't work from the command line. No installation via NPM. Re-installed via MSI and I got the result in the image attached.

Using NPM works fine.

Maybe the MSI installer leaves some traces from previous install cc @Daniel15

I've had this issue since v0.18.1. Haven't tried installing via npm to see if that fixes it

I've seen this happen when people install Yarn via Yarn itself. It usually
means there's another Yarn on your PATH. Can you try searching your
computer for "yarn.cmd" and see if one exists outside the Program Files
directory?

Sent from my phone.

On Feb 17, 2017 8:00 AM, "Jon Wolfe" notifications@github.com wrote:

I've had this issue since v0.18.1. Haven't tried installing via npm to
see if that fixes it

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/yarnpkg/yarn/issues/2706#issuecomment-280689160, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAFnHblbLkY7t7psqDQQ335jmCRbW2oHks5rdcQQgaJpZM4MDIuM
.

I did find one in the old self-update folder that apparently wasn't cleaned up on uninstall. Uninstalling, deleting that folder (well, the entire %ProgramFilesx86%/Yarn folder), and reinstalling fixed the version issue, @Daniel15.

We need to sort out this self-update feature

On 17 February 2017 at 17:05, Jon Wolfe notifications@github.com wrote:

I did find one in the old self-update folder that apparently wasn't
cleaned up on uninstall. Uninstalling, deleting that folder, and
reinstalling fixed the version issue, @Daniel15
https://github.com/Daniel15.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/yarnpkg/yarn/issues/2706#issuecomment-280707668, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACBdWM5Yw6_OLq-hJ__1UNUJCVVohiieks5rddNdgaJpZM4MDIuM
.

We need to sort out this self-update feature

I guess there's code that's looking at the self-update folder that should be deleted. Removing that should fix this

I used the MSI, not self-update, which wasn't available as a command anyway.

self-update is an old feature that doesn't exist any more (it needs to be reimplemented in a more reliable way). However, for people that have ran self-update in the past, they might still have old versions around.

2720 will fix this.

Along with deleting your Program Files (x86)\Yarn folder after uninstalling, you need to delete your Appdata\local\yarn folder as well.

To find the Appdata\local\yarn folder, type %appdata% in the run dialog box (win+R), move up a folder and move into local folder there, here you'll find the yarn folder to delete

2720 removed the self-update-related loading code. The only issue now will be if you install Yarn using Yarn or npm, which is pretty rare.

Was this page helpful?
0 / 5 - 0 ratings