jorgebucaran / nvm.fish

The Node.js version manager you'll adore, crafted just for Fish
https://git.io/nvm.fish
MIT License
2.13k stars 71 forks source link

Invalid version number or alias #84

Closed jcyamo closed 5 years ago

jcyamo commented 5 years ago

nvm use always returns the error: "nvm: invalid version number or alias: ..." regardless of which version I try to enable. This is true whether the version is read from an .nvmrc file or passed directly as an arg to the command.

$ nvm use lts
nvm: invalid version number or alias: "lts"

$ nvm use latest
nvm: invalid version number or alias: "latest"

$ echo 10.0 >.nvmrc
$ nvm
nvm: invalid version number or alias: "10.0"

This has been working flawlessly for the past however long I've been using it (a few months?), but then all of the sudden this. I haven't made any modifications to my setup other than having recently run:

$ fisher self-update && fisher

My current fish version is: fish, version 3.0.2.

Let me know if I can provide any other information. Thank you!

jorgebucaran commented 5 years ago

@jonyamo What version of nvm are you using and just out of curiosity, what's your current node version?

$ nvm -v
$ node -v
jcyamo commented 5 years ago
$ nvm -v
nvm version 1.0.0
$ node -v
v11.14.0

Although earlier I want to say I was using node v8.11.3 when I first noticed the problem.

jorgebucaran commented 5 years ago

@jonyamo The latest node release (v12) alias was missing in the index.tab and fish-nvm generated an invalid search regex as a result.

$ fisher update
nvm use latest

Thank you for reporting! :wave:

jcyamo commented 5 years ago

Works like a charm! 👌 Thanks for the ultra-fast turnaround!

ljharb commented 5 years ago

Until it’s in the index.tab, it’s not released yet, for future reference.

jorgebucaran commented 5 years ago

@ljharb I was wondering about this too. When exactly are codenames added to the index.tab? Is it when pair-numbered versions become LTS, or is it something else?

ljharb commented 5 years ago

It’s done as part of the release process. Prior to it appearing there, you can assume that any release announcement is premature.

hadnet commented 2 years ago

Why I'm getting this nvm: Invalid version number or alias: "--lts"?

jorgebucaran commented 2 years ago

@hadnet --lts is not a valid flag or Node version, use nvm install lts.

You can actually find out what versions you can install by typing: nvm install and pressing Tab.

$ nvm install ⎢Tab
latest       v0.12.10  v6.9.3   v9.2.0    v12.8.0    v14.17.0
lts/argon    v0.12.11  v6.9.4   v9.2.1    v12.8.1    v14.17.1
lts/boron    v0.12.12  v6.9.5   v9.3.0    v12.9.0    v14.17.2
lts/carbon   v0.12.13  v6.10.0  v9.4.0    v12.9.1    v14.17.3
…and 80 more rows