This is important when you need to set up react native environment. If you install with the traditional method, it will install version 3, but react need you to install version 8.3 or higher.
So, here is the way.
sudo apt install curl
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt install nodejs