@phenomlab Perfect!!! Many thanks.
node vs nodejs confusion?
-
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
https://docs.nodebb.org/installing/os/ubuntu/
curl -sL https://deb.nodesource.com/setup_lts.x | 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 thenodejs --version
command on my dev systemMore detail here
https://askubuntu.com/questions/1030622/why-do-i-see-different-versions-of-node-and-nodejs
-
Did this solution help you?
Related Topics
-
Test of youtube embeds
Solved Configure -
-
-
-
-
-
-