Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Enable corepack by default #403

Open
danreeves opened this issue Apr 22, 2024 · 1 comment
Open

Feature Request: Enable corepack by default #403

danreeves opened this issue Apr 22, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@danreeves
Copy link

Describe the Feature Request
Enable corepack by default

Is your feature request related to a particular problem?
The version of yarn in the image is v1. The recommended way to install latest versions of yarn is via corepack. Corepack is not enabled so you need to add an extra sudo corepack enable yarn in each job you run a yarn command.

See more:

How will this feature request benefit CircleCI jobs using this image?
It will allow users to install yarn in the recommended fashion and remove extra command they need to run in each job. It also will allow users to de-duplicate package manager version info.

Describe the solution you would like to see
Corepack should be enabled by default. Running yarn should use the version specified in the package.json packageManager property.

Describe alternatives you have considered

  • npm i -g yarn@[my-version]
  • sudo corepack enable yarn@[my-version]
@danreeves danreeves added the enhancement New feature or request label Apr 22, 2024
@alebelcor
Copy link

This would be great. It'll make using modern Yarn and pnpm (even npm) a breeze. And, at the same time, free you guys (CircleCI) from maintaing any Node.js package managers. A win win.

In case anyone is interested, as a workaround for now, I'm manually enabling Corepack just before installing dependencies:

- run:
  name: Enable Corepack
  command: corepack enable --install-directory="/home/circleci/bin"
- run:
  name: Install dependencies
  command: yarn install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants