1 brew update 2 brew upgrade node
sudo n latest
sudo npm cache clean -f sudo npm install -g n sudo n stable/lts
//On Linux/Mac: //The module n makes version-management easy: sudo npm install n -g //For the latest stable version: sudo n stable //For the latest version: sudo n latest
nvm use --delete-prefix $NODE_VERSION example: nvm use --delete-prefix v8.9.4