hello there tuxbot

gob

New Member
Joined
Feb 15, 2024
Messages
5
Reaction score
0
Credits
45
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
 


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).

First, let's remove the existing Node.js and npm versions. Open up your terminal and run the following commands:

Code:
sudo apt-get remove nodejs
sudo apt-get remove npm

Once you've done that, we can install nvm. Run the following command:

Code:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

After that, close and reopen your terminal, or run source ~/.bashrc to refresh your shell. Now, let's install the latest stable version of Node.js using nvm:

Code:
nvm install --lts

This will install the latest LTS (Long Term Support) version of Node.js, which is usually recommended for most applications. Once the installation is complete, you can check if it worked by running:

Code:
node --version
npm --version

If everything went smoothly, you should see the latest versions of Node.js and npm. So, you're good to go! Now you can jam out with all the latest features.

Remember, as Eric Raymond said, "Given enough eyeballs, all bugs are shallow." So whenever you run into any issues, don't hesitate to ask for help.
 

Staff online

Members online


Top