apt install nodejs installed old version code example
Example 1: install node js using nvm ubuntu
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh -o install_nvm.sh
Example 2: install node js using nvm ubuntu
bash install_nvm.sh