#Install node version manager (nvm) by typing the following at the command line.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
#Activate nvm by typing the following at the command line.
. ~/.nvm/nvm.sh
#Use nvm to install the latest version of Node.js by typing the following at the command line.
nvm install node