nvm: N/A: version "N/A -> N/A" is not yet installed

node.jsNvm

node.js Problem Overview


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?

node.js Solutions


Solution 1 - node.js

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 - node.js

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 - node.js

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 - node.js

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 - node.js

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

Solution 6 - node.js

I fixed it by running nvm use v12.21.0

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBrad ParksView Question on Stackoverflow
Solution 1 - node.jsRaymond GanView Answer on Stackoverflow
Solution 2 - node.jsBrad ParksView Answer on Stackoverflow
Solution 3 - node.jsfreedevView Answer on Stackoverflow
Solution 4 - node.jsHamfriView Answer on Stackoverflow
Solution 5 - node.jsJeffView Answer on Stackoverflow
Solution 6 - node.jsKennedy MwangiView Answer on Stackoverflow