Understanding the output of `nvm ls`. Is everything installed correctly?
I think that maybe I did something annoying during the installation process nodejs
and nvm
.
When I start bash or open a terminal, I get:
:~$ bash
N/A: version "N/A -> N/A" is not yet installed.
You need to run "nvm install N/A" to install it before using it.
Using nvm ls
from the command line I get:
going through my history, I found two lines where I was trying to set an alias (I'm sure I got this from the set of instructions I followed)
As far as I know, I have no errors other than when bash starts up and these lines are generated from .bashrc
:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
My main goal here is to understand the conclusion nvm ls
and if there is anything in there that needs to be addressed.
Bonus aside, how can I get rid of these login errors (other than just deleting the last two lines);)
I'm on ubuntu 17.04
Update:
After checking the link in Mat's answer, I can see that these are the instructions I saw. I seem to have missed a bit here and there. This is what I have done and the results so far:
After checking the link and running the update, the update did not change much, except for the version number lts/boron
. Being yellow, I am assuming it is not installed anyway. Still not sure why this is on my list.
according to the instructions i found i missed this:
nvm install iojs-v1.0.3
So, I tried:
So I cleared the red lines node -> stable
and iojs -> N/A
. They are now beautiful green. I figured out that the first line was the default alias.
I have set the alias correctly:
Doing all these extra steps finally got rid of my login errors, so that's a plus.
So, I still have yellow entries lts
...
I would still like to know if they should be there, did I do something to make them appear if they are installed? The problem is they are not installed?
The funny thing is how he was set up; I run node and e-apps without any problem, which is always the case! Just adding to my confusion.
source to share
nvm
just shows the default aliases, although there are no versions set for all of those aliases.
It nvm
does not install any Node versions by default , but contains the following aliases:
-
node
andstable
point to the latest version of Node.js. -
iojs
points to the latest version of io.js, an old unallocated fork of Node.js. -
lts/aragon
indicates the latest version of the Node LTS Aragon line (Node 4) -
lts/boron
indicates the latest version of the Node LTS Boron line (Node 6) -
lts/*
points to the latest LTS release of Node.js, which is the same as oflts/boron
August 2017. (This will change when Node 8 moves to LTS)
Since you don't have any Node versions installed, this shows that these aliases do not point to any installed Node version, so N/A
.
If you just want to run the latest version of Node.js, just run nvm install node
.
Don't install iojs
or older versions of Node.js if you don't need them. Just ignore the output N/A
, nvm
just remind you that these aliases exist.
source to share
You tried
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
This is an installer script for NVM as described on GitHub. When I visited npm they directed me to this page with instructions: NVM github
The documentation also mentions that you need to select a shell and open it after installation. It is possible with a try.
nvm ls
should lose node versions of installed packages
Listing versions
If you want to see what versions are installed:
nvm ls
source to share