Skip to content

chore: migrate to nodeLinker: node-modules#817

Open
MikeMcC399 wants to merge 1 commit intonodejs:mainfrom
MikeMcC399:migrate/yarn-node-modules
Open

chore: migrate to nodeLinker: node-modules#817
MikeMcC399 wants to merge 1 commit intonodejs:mainfrom
MikeMcC399:migrate/yarn-node-modules

Conversation

@MikeMcC399
Copy link
Copy Markdown
Contributor

@MikeMcC399 MikeMcC399 commented Apr 22, 2026

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:

  • Testing chores
  • ubuntu-latest w/ Node.js 24.x
  • macos-latest w/ Node.js 24.x

Assessment

Yarn Modern with pnp setting 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 EBADF with a TypeError. This is not a solution.

A Node.js workaround has also been proposed now 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 nodeLinker configuration setting from its default value to an explicit
node-modules setting in a new .yarnrc.yml settings file:

Before After
nodeLinker: pnp nodeLinker: node-modules

To 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 nodeLinker setting 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 test

Confirm no errors and all tests passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI tests fail under Node.js 24.15.0 LTS (EBADF)

2 participants