CircleCI-Public / node-orb

An orb for working with Node.js on CircleCI
https://circleci.com/orbs/registry/orb/circleci/node
MIT License
52 stars 80 forks source link

yarn-install fails if other version of yarn installed #148

Closed bdellegrazie closed 1 month ago

bdellegrazie commented 2 years ago

Orb version: 5.0.2

What happened:

When executing install-yarn and there is an existing version of yarn installed that is different, the install fails.

Snippet of usage:

      - node/install-yarn:
          version: '<<pipeline.parameters.yarn_version>>'

yarn_version pipeline parameter is set to 1.22.18

Output:

Selected version of Yarn is 1.22.18
Checking if YARN is already installed...
A different version of Yarn is installed (1.22.17); removing it
Installing YARN v1.22.18
mv: rename yarn-v1.22.18/* to /opt/yarn/*: No such file or directory

Exited with code exit status 1

Expected behavior:

Yarn v1.22.18 should be installed

Additional Information:

operating system: MacOS although I've seen this happen on Linux too

    macos:
      xcode: '13.2.1'
    resource_class: 'medium'
marboledacci commented 1 month ago

I'm not able to replicate this issue as that xcode version is no longer available. With newer versions everything works using the same orb version, and newer versions as well.

I'm closing this as the issue only happens in older versions no longer available. Please open a new issue if you face this in newer versions of the orb or xcode.