-
Notifications
You must be signed in to change notification settings - Fork 466
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 usability #1035
Comments
$ fnm install
error: Can't find version in dotfiles. Please provide a version manually to the command.
# Top part of the help output:
$ fnm install --help
Install a new Node.js version
Usage: fnm install [OPTIONS] [VERSION]
Arguments:
[VERSION]
A version string. Can be a partial semver or a LTS version name by the format lts/NAME Partial semver or LTS version name in format It could mention Filtering the output to something like this would probably be convenient ( # Filters to only lines with an LTS name,
# flips the order (to prefer latest version),
# sorts by the right-side (LTS name) as unique field
# Flips output of sort so the latest LTS is at the top:
$ fnm list-remote | grep '(' | tac | sort -k 2 -u | tac
v20.9.0 (Iron)
v18.18.2 (Hydrogen)
v16.20.2 (Gallium)
v14.21.3 (Fermium)
v12.22.12 (Erbium)
v10.24.1 (Dubnium)
v8.17.0 (Carbon)
v6.17.1 (Boron)
v4.9.1 (Argon)
Not quite. The problem with that usage elsewhere is the major version they refer is much more prone to shifting to a newer release where breaking changes may not be expected, or the user mistakenly thinks they're using the latest lts or As option flags the semantic meaning is a bit more distinct, and would make more sense to use in those other commands (and thus
In your case, instead of using the LTS name, you already know the version number, so just using the major semver TL;DR
|
Not sure if this is related, but i assume b/c there seems to be a missing link between actual version numbers and codenames. In my project i have an
Although
which blocks my workflow. When confirming it goes to
|
same issue with #1035 (comment)
|
@SoonIter i found a solution, respectively workaround. The fact that it would keep re-installing i.e. This is what
So, assigning an alias here is the solution. In my case, for
Now, when using fnm in a project directory where it encounters an This can be verified by checking
Of course, it would be preferable – if not a minimum requirement for seamless DX (in which i agree with @rotu) – if this alias would be set automatically on first download of any lts version. Ideally, it would also hint about newer minor releases as it becomes aware of them and offer to install and update the LTS aliases accordingly, however that may be out of scope of this bug report and an advanced nice-to-have feature for the future. |
fnm install
doesn't make it obvious what versions are available.fnm install --help
. (e.g.fnm install lts/latest
,fnm install lts/fermium
).fnm install lts
andfnm install latest
to work. It seems odd that the--lts
and--latest
options are flags, given that they fill the same role as the VERSION argument.fnm install lts/18
merely prints "error: Can't find relevant LTS named 18". It would be nice for it to show either what versions are available or recommendfnm list
The text was updated successfully, but these errors were encountered: