Skip to content

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

    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 the nodejs --version command on my dev system

    6eb1482e-0c9b-454d-aa84-199bcc845702-image.png

    More detail here

    https://askubuntu.com/questions/1030622/why-do-i-see-different-versions-of-node-and-nodejs

  • 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 💗

  • 0 Votes
    1 Posts
    16 Views
    No one has replied
  • 2 Votes
    11 Posts
    320 Views

    @veronikya said in mongodb replica set:

    The host’s local dns resolution is not configured. The problem of the host’s hosts being unable to be resolved in docker has been solved. Surprisingly
    Solution:
    Edit the /etc/resovel.conf file
    Add 127.0.0.53

    One immediate issue I can think of here is that editing resolv.conf directly is no longer supported and not recommended (because the changes do not survive a reboot) - unless you install the resolvconf package?

  • Category For User

    Solved Configure
    11
    12 Votes
    11 Posts
    267 Views

    3.5.1 has now been released. I’ve just deployed it, so safe to do so!

  • Upgrade issues

    Solved Configure
    2
    2 Votes
    2 Posts
    136 Views

    Use this code

    git fetch # Grab the latest code from the NodeBB repository git checkout v3.x git reset --hard origin/v3.x

    And you will have the latest version without specifying it

    https://docs.nodebb.org/configuring/upgrade/

  • 2 Votes
    9 Posts
    237 Views

    @Panda I see why - if you check the browser console, there’s an error logged there. This is from one of my VM’s

    image.png

    There is a decision tree that pulls the value of the editor theme from the saved browser settings on each load, but that fails if the theme has never been changed, and the user has the default (in your case, you are using light mode, so it serves “flatly” by default, but the editor itself is never set and returns null

    This below code changes that

    /* If savedTheme is undefined it will return null - based on this, we assume that the user has the default theme selected and never changed it, so we'll need to force that here */ if(!savedTheme) { var savedTheme = "flatly"; }

    If you reload your browser and test again, it should work properly.

  • Fixed background to nodebb forum

    Solved Configure
    25
    4 Votes
    25 Posts
    1k Views

    @Panda said in Fixed background to nodebb forum:

    Chatgpt told me the ::before method.

    Go figure 😛

  • 4 Votes
    3 Posts
    165 Views

    @phenomlab said in Come back PhP, all is forgiven!:

    I used IONOS for a while, and realised that Hetzner provide a much better deal for those experienced with Linux. I know @cagatay, @DownPW and myself all use Hetzner, and I think @Madchatthew (whom I haven’t seen for a while ) was also considering taking their services. There’s an affiliate link below if you’d like to go down that route

    Yep hetzner is very very cool and I haven’t seen before a panel magentment as complete as him : backup, snapshot, add cpu core, ram is easy.

    @phenomlab said in Come back PhP, all is forgiven!:

    Obtaining a VPS comes with the double-edged sword of being completely on your own with no support, although by using Virtualmin, you’ll find life so much simpler (something I know @DownPW can attest to, as I managed to convert him )

    Yep Virtualmin is very cool 😉
    And it makes life much easier for server management, domain, nginx and so on even if it is always better to know how to do all this in CLI. I would say that the 2 are really complementary

  • 2 Votes
    2 Posts
    128 Views

    @Panda I have the same opinion here. NextJS is a framework for react, and like angular, I was never one to simply dive off into the deep without having any real need to do so. I’m conversant with nodeJS, vanilla js, and several other languages (including PHP which I have years of experience in and developed / still maintain an application at work that was custom written by me to fulfill an audit requirement), and in all honesty, I don’t really want to spend my life learning new frameworks unless I have a need to do so.

    I’ve been on the nodeJS train for some time now, and given my adoption of NodeBB, this makes perfect sense.

    Bleeding edge is fun if you want to experiment and learn, but with so many frameworks popping up all over the place, how many do we actually need?

    I guess most of this really depends on unique use cases, but I’ve yet to come across an issue that meant I had to rewrite an application in a different language to resolve an issue. It’s almost like using a bulldozer to find a china cup.