I cant install different version of yarn

in my config I’ve set

  • node/install:
    install-yarn: true
    yarn-version: 4.0.2
    node-version: “20.10”

and I get

Selected version of Yarn is 4.0.2
Checking if YARN is already installed…
A different version of Yarn is installed (1.22.19); removing it
^@^@Installing YARN v4.0.2

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
mv: cannot stat ‘yarn-v4.0.2/*’: No such file or directory

Exited with code exit status 1

Can someone explain me what and how to do to make it working as yarn 1 is abandoned?

1 Like

Which machine image are you using as your base environment?

CircleCI provides a number of images pre-built with node, including configurations already configured with node 20.10.

The error you are seeing is coming from the node ORB, which has direct support/issue reporting on it’s github page

Sadly after having searched the known issues the problem was first reported back in September and no fix has been applied to the ORB, so for now your best option will be to use standard command line instructions, rather than the ORB to do the install/upgrade.