Following instructions here:
I get the following results:
npm -v 3.10.10 npm install npm@latest -g npm -v 3.10.10
According to the link above, the current stable version of npm is 5.6.0.
Edit: For context, the reason I am trying to upgrade Node and npm is because I am installing UIkit and their instructions said "Use Node.js version 8.2.0 or higher".
Edit: I don't know if safe/best practise, but I did the following (there's a myriad of solutions out there, many seemed over complicated and not authoritative)
sudo apt-get purge --auto-remove nodejs
Then followed instructions from:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs
Now I get desired versions:
npm -v 5.6.0 node --version v8.9.4