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

Upgrade Yarn Install Command to Berry #179

Closed KyleTryon closed 1 year ago

KyleTryon commented 1 year ago

As reported here: https://discuss.circleci.com/t/how-do-i-use-yarn-3-4-1-with-the-node-orb/47187 The current Yarn installation command is pulling from an outdated repo. New users of Yarn will use Yarn Berry moving forward.

Suggestion: With the next major version, update the Yarn install command to install Yarn Berry via NPM

jordanmaguire commented 12 months ago

Hello there @KyleTryon

I don't know the best place to put this comment so I'll put it here and let me know where its best to follow up on.

This issue is closed as complete, but I'm having the same issue as in the linked discussion thread. I'm trying to download 3.6.1. The install yarn step gives me this error

Selected version of Yarn is 3.6.1
Checking if YARN is already installed...
Installing YARN v3.6.1

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

Exited with code exit status 1

Looking at the code I can see the URL ("https://yarnpkg.com/downloads/$YARN_ORB_VERSION/yarn-v$YARN_ORB_VERSION.tar.gz") will throw 404s for any of the versions I'm trying. Presumably it is pulling from a Yarn 1 location.

A version that does work is the GH release download (EG: https://github.com/yarnpkg/berry/archive/refs/tags/@yarnpkg/cli/3.6.3.tar.gz).

I'm fine to use Yarn 1 for now, as our config was using a ruby orb that installed yarn 1 previously.

Moving forward I'd love to be able to specify a berry version and have that work.

Is there something I'm doing wrong here? My configuration includes

      - node/install:
          install-yarn: true
          yarn-version: 3.6.1

      # The Node orb uses the node version specified in the .nvmrc
      - node/install-packages:
          pkg-manager: yarn
          override-ci-command: "yarn install --immutable"
          with-cache: true

Thanks in advance, do let me know if I can help in some way.

AlvesJorge commented 3 months ago

Ping! Same error as jordan

cromega commented 2 months ago

Same here.