chore: migrate to nodeLinker: node-modules#817
Open
MikeMcC399 wants to merge 1 commit intonodejs:mainfrom
Open
chore: migrate to nodeLinker: node-modules#817MikeMcC399 wants to merge 1 commit intonodejs:mainfrom
MikeMcC399 wants to merge 1 commit intonodejs:mainfrom
Conversation
This was referenced Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Situation
This repo is configured internally using yarn@4.11.0 (released Nov 2025) with the default Yarn Modern configuration setting nodeLinker: pnp.
As described in issue #813, the CI workflow ci.yml fails in Node.js 24.15.0, leading to an inability to maintain the repo.
The failing jobs are:
Assessment
Yarn Modern with
pnpsetting is not compatible with Node.js Active LTS 24.15.0, which is the cached LTS version in the GitHub Actions runner image currently being deployed:During the deployment, which typically may take several days, GitHub Actions jobs may be served by either the previous image version or the one being deployed. This means that failures are random until the deployment has completed. The deployment can be monitored on actions/runner-images.
Attempting to resolve the issue by updating Yarn to the latest release yarn@4.14.1, keeping the default nodeLinker: pnp configuration, replaces the error condition
EBADFwith aTypeError. This is not a solution.A Node.js workaround has
also been proposednow been landed through PR nodejs/node#62835. This would need to be available in Node.js 24. There are many unknowns concerning the possible availability, including the delay in the release of Node.js 26.0.0. Possibly, if all goes well, the workaround could be available in mid May 2026 in Node.js 24. Relying on the workaround however would mean that in the interim period, Dependabot update PRs would fail, as would release PRs. The duration is also not predictable., and assumes that the open PR for the workaround will be approved and that it lands.Change
To fix the issue without delay, migrate the
nodeLinkerconfiguration setting from its default value to an explicitnode-modulessetting in a new .yarnrc.yml settings file:nodeLinker: pnpnodeLinker: node-modulesTo achieve this, cherry-pick 22a3fc0 from PR #652 originally submitted by @geigerzaehler.
The setting has no effect on the npm module published as corepack to the npm registry, apart from unblocking the ability to publish new versions of the package. The
nodeLinkersetting is not part of the published npm module.Verification
On Ubuntu 24.04.4 LTS, with Node.js 24.15.0 LTS, execute:
corepack yarn install corepack yarn build corepack yarn typecheck corepack yarn lint corepack yarn testConfirm no errors and all tests passing.