Open danreeves opened 4 months ago
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
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 thepackage.json
packageManager
property.Describe alternatives you have considered
npm i -g yarn@[my-version]
sudo corepack enable yarn@[my-version]