Update the specific version of Nodejs that you require to install it on Ubuntu. To install the latest version – Simply check the latest version from Nodejs Github page and upate the command below.
# Install node and npm version=10.x; curl -sL https://deb.nodesource.com/setup_$version | sudo bash - apt-get install nodejs