ubuntu 24.04 - setting up nodejs 22/20 instead of install older versions nodejs

When you tries to install nodejs usng  

sudo apt install -y nodejs

this typically installs nodejs 18 on ubuntu. To upgrade to a newer version of it, you have to 

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -

And then run 

sudo apt install -y nodejs

And then you have node 22 installed:




Comments

Nishant Saurabh said…

I’ve been looking for a well-structured breakdown of Node.js architecture for a while, and this hit the spot. Specifically, the bit about workflows vs projects—that finally clicked for me. Awesome work!.

Popular posts from this blog

mongosh install properly

gemini cli getting file not defined error

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20