Node.js can be easily installed by downloading the package from the official node.js website.
Open the downloaded package and follow the onscreen instructions by clicking “Continue” and agreeing to the terms of the license.
Using Package manager
use any of the following package managers installed on your system to install node.js on the go.
brew install node
port install nodejs<major_version_number>
pkgin -y install nodejs
After installation verify the version installed.