Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating Node.JS on Ubuntu 20.04 LTS From 10.x to 12.x+

#1
Hello, I've looked far and wide and couldn't remember the correct way on my ubuntu system so I will explain here for everyone and to have notes for myself lol.

So first off

update/upgrade

sudo apt update
sudo apt upgrade

install node who cares not gonna use it anyways.

sudo apt install nodejs

We NEED npm though, which probably doesn't come stock with nodejs.

sudo apt install npm

Alright check your versions

probably not what you want so continue.

sudo npm cache clean -f
sudo npm install -g n
sudo n stable


these 3 lines will update to the latest stable version. Don't use it if you need a specific version of node.

they say you can just run "n" and it will ask for version from there but that didn't work for me, i had to type this next line exactly as you see.

sudo n 12.13.0

^^^^^^^^^^

doing this put in the correct version of node on output node -v or node --version

Check for yourself now.

For some reason on my version of ubuntu within azure vm, couldn't use the version curling the github script that did the download for you.

Want to undo your changes?

Code:
sudo n rm 12.13.0     # replace number with version of Node that was installed
sudo npm uninstall -g n

Gotchu covered, need anymore help? Comment below. I'm here.

SickProdigy
[Image: RvghcKs.png]
Reply

#2
also how do i check to see what version of ubuntu i have.. i may have downloaded an older version in my haste to rid my machine of windows. also if i am out of date can i just update without having to delete and reinstall the entire OS?
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

[-]
Discord

[-]
Active Threads
News - Stardew Valley’s Latest 1.5.5 Upd...
Last Post: xSicKxBot
Today 07:10 AM
» Replies: 0
» Views: 1
News - Hood: Outlaws & Legends Season 2 ...
Last Post: xSicKxBot
Today 07:09 AM
» Replies: 0
» Views: 0
(Indie Deal) RE8, Frontier, Slitherine, ...
Last Post: xSicKxBot
Today 05:00 AM
» Replies: 0
» Views: 6
Microsoft - Inclusion for all this Inter...
Last Post: xSicKxBot
Today 02:39 AM
» Replies: 0
» Views: 5
News - .hack//G.U. Last Recode Is Coming...
Last Post: xSicKxBot
Today 02:39 AM
» Replies: 0
» Views: 3
News - A New Peacemaker TV Show Trailer ...
Last Post: xSicKxBot
Today 02:39 AM
» Replies: 0
» Views: 3
(Indie Deal) 2K, SNK, Ziggurat & Graffit...
Last Post: xSicKxBot
Yesterday 11:12 PM
» Replies: 0
» Views: 11
News - George Clooney Reveals Why He Tur...
Last Post: xSicKxBot
Yesterday 08:39 PM
» Replies: 0
» Views: 9
(Indie Deal) 2K, SNK, Ziggurat & Graffit...
Last Post: xSicKxBot
Yesterday 05:39 PM
» Replies: 0
» Views: 10
Microsoft - Fund manager RFP opens for M...
Last Post: xSicKxBot
Yesterday 05:39 PM
» Replies: 0
» Views: 3

[-]
Twitter

[-]
Sponsored
Get the Deal of the Week at RefurBees.com



Discord Server © SickGaming.net 2012-2021