chore: migrate to nodeLinker: node-modules#817
Conversation
|
You have been asked to review. You wrote in #652 (comment)
As far as I can see, this would mean waiting many weeks to have CI working again, due to staged progress of Node.js releases. This PR provides an immediate mitigation and can be reverted later, if there is a better alternative. |
arcanis
left a comment
There was a problem hiding this comment.
As you wish - I don't have much bandwidth for Corepack currently.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Closing, as #831 resolves the issue #813 I may however re-submit if GitHub Actions rolls out Node.js 24.15.0 on Ubuntu 24.04, in which case a CI failure "TypeError: Cannot convert undefined or null to object" can be expected in the "Testing chores" job. Considering that GitHub Actions has already rolled back the deployment of Node.js 24.15.0 on Ubuntu a couple of times, I'm not making any predictions about what will happen next. |
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.0Edit: Runner image update:
During deployments, 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. Deployments 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.