Reputation: 71961
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?
Upvotes: 140
Views: 61098
Reputation: 6469
Here's how I fixed the issue and set the default version to a specific Node LTS version:
nvm install lts/gallium # node v16
nvm alias default lts/gallium
(Notes: the commands in other answers did not fix the issue for me
nvm install 'lts/*'
nvm alias default node
I'm using ZSH & nvm v0.34.0)
Upvotes: 0
Reputation: 2235
use
when first loadingYou 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
Upvotes: 10
Reputation: 30037
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.
Upvotes: 26
Reputation: 4870
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)
.
Upvotes: 300
Reputation: 2209
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
Upvotes: 11
Reputation: 71961
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
Upvotes: 35