node vs nodejs confusion?

Solved Configure
  • This was so confusing that I think its worth a forum post on it. I’m sure I wont be the last person to be thrown by this.
    So it started two days ago when I wanted to update Nodejs (or should I say node) to version 18.x on a server, and it seemed to download it but …
    nodejs --version always gave a very old number
    Thanks to @phenomlab I now realise the command to use should be
    node --version
    … but how confusing that there are two similarly named packages, and I seemed to have both.
    Whats more the terms node and nodejs are used interchangeably in some places.
    For example although NodeBB uses node
    On the nodebb instructions, the install command writes nodejs!

    sudo apt-get install -y nodejs

    So while I sort this out in my head, if the NodeBB uses ‘node’, why is the install command stating nodejs ?

  • @eeeee have a look at the below

    curl -sL | sudo -E bash -
    sudo apt-get install -y nodejs

    You’ll notice that we are in fact “installing” NodeJS but never actually have a need to reference it. Here’s the nodejs --version command on my dev system


    More detail here

  • phenomlabundefined phenomlab has marked this topic as solved on

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation💗