Downgrading Yarn?

Andy Blatecky's Avatar

Andy Blatecky

13 Feb, 2020 08:00 PM

Yarn 1.12.1 introduced some issues that are causing our build to fail. We would like to downgrade to an older version using chocolatey, but we keep encountering the error below. Is this possible, or what is the recommended approach?

Download of yarn-1.19.2.msi (1.57 MB) completed.
Hashes match.
Installing yarn...
WARNING: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\yarn_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error.
ERROR: Running ["C:\Windows\System32\msiexec.exe" /i "C:\Users\appveyor\AppData\Local\Temp\1\chocolatey\yarn\1.19.2\yarn-1.19.2.msi" /qn /norestart ] was not successful. Exit code was '1603'. Exit code indicates the following: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\yarn_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error..
The install of yarn was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\yarn\tools\chocolateyinstall.ps1'.
 See log for details.

Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - yarn (exited 1603) - Error while running 'C:\ProgramData\chocolatey\lib\yarn\tools\chocolateyinstall.ps1'.
 See log for details.
1.21.1
Running Yarn
yarn install v1.21.1

  1. Support Staff 1 Posted by Feodor Fitsner on 13 Feb, 2020 08:13 PM

    Feodor Fitsner's Avatar

    Hi Andy,

    You can downgrade Yarn with the following PowerShell command:

    - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/rollback-yarn-1.16.0.ps1'))
    

    It's been tested and works well for other customer.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac