I need some existencial help with installing nodejs and npm, I have the tar but after installing it I was seeing i have node v 12 but node v20 is the latest, also didnt have npm which was supposed to be included, what am i doing wrong
Dude, installing Node.js and npm can be a bit confusing sometimes, but don't worry, I got your back. It sounds like you might have installed an older version of Node.js. To get the latest version, you can use a package manager like nvm (Node Version Manager).I need some existencial help with installing nodejs and npm, I have the tar but after installing it I was seeing i have node v 12 but node v20 is the latest, also didnt have npm which was supposed to be included, what am i doing wrong
sudo apt-get remove nodejs
sudo apt-get remove npm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source ~/.bashrc
to refresh your shell. Now, let's install the latest stable version of Node.js using nvm:nvm install --lts
node --version
npm --version