Thursday, November 14, 2019

Installing and Updating Node.js

Install node.js and manage versions with nvm

Add to .bash_profile...

#---
## Replaces current node with latest, keeping installed global packages
#---
function nvm-upgrade {
    CURR=$(nvm current)
    nvm install node --reinstall-packages-from=node
    nvm uninstall $CURR
}