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

fnm install --corepack-enabled [VERSION] prevents setting default + aliases at install #1071

Open
polarathene opened this issue Nov 11, 2023 · 0 comments

Comments

@polarathene
Copy link
Contributor

Reference:


Docs repeat the following snippet across commands:

      --corepack-enabled
          Enable corepack support for each new installation. This will make fnm call `corepack enable` on every Node.js installation. For more information about corepack see https://nodejs.org/api/corepack.html

          [env: FNM_COREPACK_ENABLED]
  • Not sure if it makes sense across all those commands? Especially with the help text of each new installation.
  • When used with fnm install (with --latest / --lts / or version), default version is not set, nor aliases. Corepack is enabled, but probably should have kept the other expected behaviour.

Reproduction:

$ docker run --rm -it rust bash
$ curl -fsSL https://fnm.vercel.app/install | bash && source ~/.bashrc

$ fnm install --lts --corepack-enabled
Installing Node v20.9.0 (x64)
Enabling corepack for Node v20.9.0

# `default` + `lts-latest` aliases are not set:
$ fnm list
* v20.9.0
* system

# Default version was not set (required to use corepack/node), nor `lts-latest` alias (must now know major version):
$ fnm use 20

# pnpm command is successful (corepack is enabled):
$ corepack prepare pnpm@latest --activate && pnpm --version
8.10.2

$ fnm --version
fnm 1.35.1
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

1 participant