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:

<code> nvm ls </code>
      <br>
        <script async src=
result" data-src="/img/2eba68946ca7231175a8f1a5cd4cfcd8.png" class=" lazyloaded" src="https://fooobar.com//img/2eba68946ca7231175a8f1a5cd4cfcd8.png">

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.

after the first update

according to the instructions i found i missed this:

nvm install iojs-v1.0.3

      

This fixed <code> iojs </code>
      <br>
        <script async src=
" data-src="/img/dcb93c0c98e6e874496d5216e33c727d.png" class=" lazyloaded" src="https://fooobar.com//img/dcb93c0c98e6e874496d5216e33c727d.png">

So, I tried:

install node, clear node -> stable line

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:

everything looks better

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.

+3


source to share


2 answers


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

    and stable

    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 of lts/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.

+2


source


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

0


source







All Articles