Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to update and/or remove Corepack inside Node.js installation #1378

Open
o-l-a-v opened this issue Feb 6, 2025 · 2 comments
Open

Option to update and/or remove Corepack inside Node.js installation #1378

o-l-a-v opened this issue Feb 6, 2025 · 2 comments

Comments

@o-l-a-v
Copy link

o-l-a-v commented Feb 6, 2025

Node.js versions comes bundled with a given Corepack version.

Maybe users wants to use the latest version of Corepack. Or maybe the Corepack version bundled with the latest version of supported Node.js version breaks:

It'd be great if fnm had the ability to and/or:

  • Update the Corepack version inside each Node.js installation
    • On existing local installation and on fnm install?
  • Remove Corepack inside Node.js installation so users can use a globally installed version instead.
    • Both on existing local installation and on fnm install with a new option --remove-corepack?

Corepack will be removed from Node.js in the future, so the remove option for older versions of Node.js managed with fnm would be great.

@troyere
Copy link

troyere commented Feb 7, 2025

Remove Corepack inside Node.js installation so users can use a globally installed version instead

It's rather counterproductive, Node was made to contain corepack at its core.

It would be wiser to add options in Node to allow finer management of Corepack, which today seems to be an obvious need.

@o-l-a-v
Copy link
Author

o-l-a-v commented Feb 7, 2025

fnm places its multishell path on top in PATH on changing directory, fnm use etc., and with it, the bundled Corepack version gets to the top of the list.

It's probably safe to assume that Node.js won't make huge efforts in improving how Corepack is handled when embedded with Node.js, because they've decided to remove it.

Thus, I think the ability to optionally remove the bundled Corepack in a fnm managed Node.js install makes sense. It would make it easier to manage what Corepack version is used.

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

No branches or pull requests

2 participants