I am having trouble updating node and npm

I’m currently using Ubuntu 18.04.6 LTS and I want to upgrade nodejs to version 16 but, unable to.
I have almost spent 4 hours trying to resolve this and stackoverflow is my last option.

Problems

  1. Sudo apt-get update gives:
    error about some docker repo 404 Not Found [IP: 13.35.169.116 443]

  2. I followed this tutorial and it did not help.

  3. Running node --version gives v0.10.31

  4. Running npm --version gives This

>Solution :

Node is not up to date in ubuntu’s ppa. I would recommend just using nvm ( node version manager ) to install the version you need: https://github.com/nvm-sh/nvm/blob/master/README.md

Leave a Reply