Skip to content

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

@polarathene

Description

@polarathene

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions