mac set node version code example
Example 1: update nodejs mac
sudo npm cache clean -f
sudo npm install -g n
sudo n stable/lts
Example 2: how to change node version
nvm use --delete-prefix $NODE_VERSION
example:
nvm use --delete-prefix v8.9.4
sudo npm cache clean -f
sudo npm install -g n
sudo n stable/lts
nvm use --delete-prefix $NODE_VERSION
example:
nvm use --delete-prefix v8.9.4