nvm: N/A: version "N/A -> N/A" is not yet installed
I have nvm
setup to use the latest long term support version in ~/.nvm/alias/default
, by setting it to lts/*
.
When I try and have my shell initialize my nvm version (zsh), I get the following error:
N/A: version "N/A -> N/A" is not yet installed.
Why is this happening?
Solution 1:
Error: N/A: version "N/A -> N/A" is not yet installed
I got this error after doing nvm use
(switching to older Node version 8.11.1, shown in .nvmrc file), nvm uninstall
(newer Node version 9.0.0), then a git push
.
nvm ls
shows my "default" Node version was pointing to the uninstalled one: default -> 9.0.0 (-> N/A)
. This caused the error.
To fix: nvm alias default node
points "default" to the latest installed Node version (8.11.1).
Now nvm ls
shows default -> node (-> v8.11.1)
.
Solution 2:
Turns out this error is telling me that I don't have it installed (ie the latest long term support version). To fix it, I had to run:
$ nvm install 'lts/*'
and it worked after that! Snagged from here
Solution 3:
Your "default" Node version is not reachable (many reasons)
Many answers but there isn't a straightforward solution, let's try with:
nvm install 'lts/*'
nvm alias default node
the first command ensure you have latest LTS version installed and then set the default.
Solution 4:
I faced the same issue when i used nvm to install node 12 and node 10. To fix this i used the command:
nvm alias default node
Solution 5:
Prevent nvm from trying to use
when first loading
You may not need (or want) the latest version of node installed, and yet wish to have the nvm command available, so in your .bashrc (or equivalent) include the --no-use flag when loading nvm
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use # This loads nvm
Thanks to Ioannis Poulakas