Install the build-essential package by running the following
sudo apt-get update && sudo apt-get install build-essential
Install nvm using cURL
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
Now you can install and use any version of node required for a particular app
- To install a particular version
nvm install 10.0
- To use a particular version
nvm use 10.0