Skip to content

chore: migrate to nodeLinker: node-modules#847

Merged
aduh95 merged 1 commit into
nodejs:mainfrom
MikeMcC399:migrate/yarn-node-modules
May 15, 2026
Merged

chore: migrate to nodeLinker: node-modules#847
aduh95 merged 1 commit into
nodejs:mainfrom
MikeMcC399:migrate/yarn-node-modules

Conversation

@MikeMcC399
Copy link
Copy Markdown
Contributor

Situation

corepack yarn lint fails with Node.js 24.15.0 LTS

TypeError: Cannot convert undefined or null to object

Node.js 24.15.0 is currently rolling out in ubuntu-latest, so failures are sporadic.

The corresponding upstream issue yarnpkg/berry#7106 is unresolved.

Change

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 allowing the CI job chore ("Testing chores") to succeed under Node.js >=24.15.0. 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.

@MikeMcC399
Copy link
Copy Markdown
Contributor Author

The actual version of Node.js selected by the GitHub Actions runner is randomly 24.14.1 or 24.15.0 during the current ubuntu-24.04 rollout. As luck would have it https://github.com/nodejs/corepack/actions/runs/25918361425/job/76180620903?pr=847

executed the chore job in Node.js 24.15.0 and so has effectively tested that this PR provides a successful workaround for #837

@MikeMcC399 MikeMcC399 marked this pull request as ready for review May 15, 2026 12:58
@aduh95
Copy link
Copy Markdown
Contributor

aduh95 commented May 15, 2026

#817 had been approved (but closed by mistake I assume)

@aduh95 aduh95 merged commit 720204e into nodejs:main May 15, 2026
9 checks passed
@MikeMcC399 MikeMcC399 deleted the migrate/yarn-node-modules branch May 15, 2026 13:45
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 lint fails under Node.js 24.15.0 LTS (TypeError) - Rev2

3 participants