nodejs install

Download nvm and reload your shell.

bash
1
2
wget -qO- "https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh" | bash
source ~/.bashrc

Install the latest version of node and use it.

bash
1
2
nvm install node
nvm use node

Update the package manager.

bash
1
npm install -g npm@latest