Skip to content

Skip enabling Corepack if it's not bundled with Node.js#1566

Open
moposx wants to merge 4 commits into
Schniz:masterfrom
moposx:fix/corepack-range-check
Open

Skip enabling Corepack if it's not bundled with Node.js#1566
moposx wants to merge 4 commits into
Schniz:masterfrom
moposx:fix/corepack-range-check

Conversation

@moposx

@moposx moposx commented Jun 3, 2026

Copy link
Copy Markdown

Previously fnm ran corepack enable directly, which could lead to a "No such file or directory" error when the installed Node version did not bundle Corepack.

Now the installed version is checked against the semver range ^14.19.0 || 16.9.0 - 24.x.x. If the version doesn't bundle corepack, fnm will just skip enabling Corepack and leave the user a hint to install and enable Corepack manually via npm install -g corepack && corepack enable.

This will serve as a workaround as #1398, #1469 are still open, and can provide clarity if a user runs into issues like #1554.

moposx added 4 commits June 3, 2026 21:09
Previously fnm ran `corepack enable` unconditionally, which produced
a "No such file or directory" error when the installed Node version did not
bundle corepack.

Now the installed version is checked against the semver range
`^14.19.0 || 16.9.0 - 24.x.x`. If the version doesn't bundle corepack,
the step is skipped, instead a hint is given to user to install and enable
Corepack via `npm install -g corepack && corepack enable`.
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.

1 participant