You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1 MB (however, it's smaller than yarn, so this will actually decrease the image size)
Brief description of tool
Corepack provides shims for the Yarn and pnpm package managers that automatically download and run the version of the manager defined in package.json. Adding Corepack to the base image will let projects using pnpm and Yarn 2+ run these tools without an extra install step.
Currently, the runner images include Yarn 1.x. This should be deleted, as it will conflict with Corepack's yarn shim. The shim also uses Yarn 1.x by default in most cases, so most workflows should be unaffected by this change. The only observable incompatibility I could find is that yarn init will use Yarn 4.x if ran outside a project directory; however, since this command creates a new project, I would not expect to see it in a CI workflow.
Provide a basic test case to validate the tool's functionality.
yarn --version
pnpm --version
Platforms where you need the tool
Azure DevOps
GitHub Actions
Runner images where you need the tool
Ubuntu 22.04
Ubuntu 24.04
macOS 13
macOS 13 Arm64
macOS 14
macOS 14 Arm64
macOS 15
macOS 15 Arm64
Windows Server 2019
Windows Server 2022
Windows Server 2025
Can this tool be installed during the build?
npm install -g corepack
# Note that currently Node.js bundles a version of corepack where the shims are disabled by default.# This version is slated to be removed in Node 25, so I think it's best to ignore it,# and just install the latest from NPM.
FYI, I didn't tick any of the runner image checkboxes, since it seems to me that the best time to implement this will be when adding the next generation of operating systems. But I won't mind if this is implemented in existing images as well.
corepack is not a drop-in substitute for Yarn Classic
Currently corepack is already part of all base images, since it is still bundled with Node.js. This is planned to change however - see Node.js 24 documentation corepack
Before deciding to add a separately installed version of corepack to GitHub runner images, I suggest that a review of corepack open issues should be done.
Corepack releases 0.y.z follow Semantic Versioning Specification for initial development and by this definition should not be considered stable. Corepack released through Node.js additionally carries the label Experimental - see Node.js documentation corepack and therefore not suitable for production usage.
Please don't remove Yarn Classic! This would be a breaking change!
Could you clarify how breaking it would be? As I've mentioned in my initial post, the only incompatibility I could find was with yarn init, which is not something I'd expect to see in a CI pipeline.
Please don't remove Yarn Classic! This would be a breaking change!
Could you clarify how breaking it would be?
I don't think I'm able to say what it might break as that would mean that I knew about all GitHub workflows using Yarn Classic. It seems like a very courageous act to remove Yarn Classic and then rely on corepack.
As I've mentioned in my initial post, the only incompatibility I could find was with yarn init, which is not something I'd expect to see in a CI pipeline.
I don't think I'm able to say what it might break as that would mean that I knew about all GitHub workflows using Yarn Classic.
I mean... you're the one saying that this would be a breaking change. How can you claim this if you don't know what would break?
You're right. I've claimed it's a breaking change without providing any concrete example of a workflow where it would break. I will see if I can find any.
Hi @SpecLad ,
We are sorry to inform you that at this point in time, it is difficult to add this tool to our images.
Having said that we will surely re-evaluate the possibility of addition of this tool.
However, we will consider including this tool if more users want it.
Hence closing this feature request as of now.
Thanks.
Re-reading the original post, it doesn't seem clear that corepack is already included in GitHub runner images.
Each GitHub runner image ships with an LTS version of Node.js and these include a bundled version of corepack (currently either corepack@0.31.0 or corepack@0.32.0, depending on the Node.js version installed in the runner).
The Node.js release process is continuing to update the bundled version of corepack in Node.js. For instance, nodejs/node#58665 to release Node.js 22.17.0 updates corepack to 0.33.0.
So currently all GitHub runners do ship with corepack, however it is only a recent version, not necessarily corepack@latest.
According to the Node.js release scheme, the situation will need revisiting at the latest when the future Node.js 26 is promoted to LTS in October 2026. It will also become relevant at an earlier date, when Node.js 25 is released in October 2025 (see https://nodejs.org/docs/latest-v24.x/api/corepack.html where Node.js states "Corepack will no longer be distributed starting with Node.js v25.") and actions/setup-node is being used to install an alternate version of Node.js.
According to the Node.js release scheme, the situation will need revisiting at the latest when the future Node.js 26 is promoted to LTS in October 2026.
FWIW, I specifically requested that corepack be installed from NPM so that the situation wouldn't need to be revisited later.
According to the Node.js release scheme, the situation will need revisiting at the latest when the future Node.js 26 is promoted to LTS in October 2026.
FWIW, I specifically requested that corepack be installed from NPM so that the situation wouldn't need to be revisited later.
The Node.js Technical Steering Committee took a vote in March 2025, which resulted in plans to remove Corepack from Node.js distribution, no change to Corepack being enabled by default (which npm install -g corepack does in fact enable) and no change to its experimental status.
It is possible that Corepack develops further and is able to release a stable v1.0.0 release, in which case it would be a candidate for use in production and GitHub staff may be able to reconsider adding it to GitHub runner images.
The requirements and request for this is covered in issue Release corepack@1.0.0, which you may like to subscribe to.
Activity
SpecLad commentedon Jun 3, 2025
FYI, I didn't tick any of the runner image checkboxes, since it seems to me that the best time to implement this will be when adding the next generation of operating systems. But I won't mind if this is implemented in existing images as well.
kishorekumar-anchala commentedon Jun 4, 2025
Hi @SpecLad ,
Thank you for bringing this issue to our attention. We will look into this issue and will update you after investigating.
MikeMcC399 commentedon Jun 16, 2025
Please don't remove Yarn Classic! This would be a breaking change!
corepack is not a drop-in substitute for Yarn Classic
Currently
corepackis already part of all base images, since it is still bundled with Node.js. This is planned to change however - see Node.js 24 documentation corepackMikeMcC399 commentedon Jun 16, 2025
Before deciding to add a separately installed version of corepack to GitHub runner images, I suggest that a review of corepack open issues should be done.
The latest release is currently corepack@0.33.0.
Corepack releases
0.y.zfollow Semantic Versioning Specification for initial development and by this definition should not be considered stable. Corepack released through Node.js additionally carries the label Experimental - see Node.js documentation corepack and therefore not suitable for production usage.SpecLad commentedon Jun 16, 2025
Could you clarify how breaking it would be? As I've mentioned in my initial post, the only incompatibility I could find was with
yarn init, which is not something I'd expect to see in a CI pipeline.MikeMcC399 commentedon Jun 16, 2025
@SpecLad
I don't think I'm able to say what it might break as that would mean that I knew about all GitHub workflows using Yarn Classic. It seems like a very courageous act to remove Yarn Classic and then rely on
corepack.https://github.com/eslint/css/blob/main/.github/workflows/ci-build-all-pm.yml is an example of a workflow using
yarn init(albeit with Yarn Modern, not Yarn Classic), however it does show that the assumption thatyarn initis never used in any workflow is not correct.SpecLad commentedon Jun 16, 2025
I mean... you're the one saying that this would be a breaking change. How can you claim this if you don't know what would break?
MikeMcC399 commentedon Jun 17, 2025
@SpecLad
You're right. I've claimed it's a breaking change without providing any concrete example of a workflow where it would break. I will see if I can find any.
sangeeths03 commentedon Jun 18, 2025
Hi @SpecLad ,
We are sorry to inform you that at this point in time, it is difficult to add this tool to our images.
Having said that we will surely re-evaluate the possibility of addition of this tool.
However, we will consider including this tool if more users want it.
Hence closing this feature request as of now.
Thanks.
jasikpark commentedon Jun 18, 2025
What's the best way to provide feedback that we are users of corepack who would benefit from support?
MikeMcC399 commentedon Jun 19, 2025
Re-reading the original post, it doesn't seem clear that corepack is already included in GitHub runner images.
Each GitHub runner image ships with an LTS version of Node.js and these include a bundled version of corepack (currently either
corepack@0.31.0orcorepack@0.32.0, depending on the Node.js version installed in the runner).The Node.js release process is continuing to update the bundled version of corepack in Node.js. For instance, nodejs/node#58665 to release Node.js 22.17.0 updates corepack to 0.33.0.
So currently all GitHub runners do ship with corepack, however it is only a recent version, not necessarily
corepack@latest.According to the Node.js release scheme, the situation will need revisiting at the latest when the future Node.js 26 is promoted to LTS in October 2026. It will also become relevant at an earlier date, when Node.js 25 is released in October 2025 (see https://nodejs.org/docs/latest-v24.x/api/corepack.html where Node.js states "Corepack will no longer be distributed starting with Node.js v25.") and actions/setup-node is being used to install an alternate version of Node.js.
SpecLad commentedon Jun 21, 2025
FWIW, I specifically requested that corepack be installed from NPM so that the situation wouldn't need to be revisited later.
MikeMcC399 commentedon Jun 22, 2025
@SpecLad
The remark about revisiting the situation was more concerned with how the status of Corepack might develop in the future. Corepack has been classed as not recommended in production environments since its introduction into Node.js 14.19.0 in Feb 2022. See also #12310 (comment) (above).
The Node.js Technical Steering Committee took a vote in March 2025, which resulted in plans to remove Corepack from Node.js distribution, no change to Corepack being enabled by default (which
npm install -g corepackdoes in fact enable) and no change to its experimental status.It is possible that Corepack develops further and is able to release a stable
v1.0.0release, in which case it would be a candidate for use in production and GitHub staff may be able to reconsider adding it to GitHub runner images.The requirements and request for this is covered in issue Release corepack@1.0.0, which you may like to subscribe to.
* install npm package `corepack` before enable it on Windows image of…
* install npm package `corepack` before enable it on Windows image of…
* install npm package `corepack` before enable it on Windows image of…
* install npm package `corepack` before enable it on Windows image of…
* fix actions/runner-images#12310 like bbfd8e7 @ .github/actions/fe/a…