how to upgrade node version in mac code example
Example 1: upgrading node on mac
1 brew update
2 brew upgrade node
Example 2: update node mac to specific version
sudo npm install n -g
sudo n stable
sudo n latest
Example 3: update to node 12 mac
sudo chown -R `whoami`:admin /usr/local/include/node
sudo chown -R `whoami`:admin /usr/local/bin
sudo chown -R `whoami`:admin /usr/local/share
sudo chown -R `whoami`:admin /usr/local/lib/dtrace
brew link --overwrite node
sudo npm cache clean -f
sudo npm install -g n
sudo n stable/lts