@latest_post
Install Node.js in Linux
GitHub for asdf-nodejs.
Install asdf
Clone and install from the AUR:
cd ~/tmp
git clone https://aur.archlinux.org/asdf-vm.git
cd asdf-vm/
makepkg -si
Add some lines to your .profile and .bashrc files:
echo -e '\nexport PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"' >> ~/.profile
echo -e '\n. <(asdf completion bash)' >> ~/.bashrc
Make changes effective immediately with:
source ~/.profile
exec $SHELL
Update asdf
To update to the latest stable version just redo the process above.