Upgrading a mac from Node 10 to Node 12

I upgrade Node infrequently enough that I can’t easily remember the process. To save myself some time in the future I decided to document my fumbling around while upgrading my mac from Node 10 to Node 12.

$ node -v

Step 1 – Remember Brew Exists

$ brew update
$ brew search node
$ brew unlink node
$ brew install node@12
$ brew link node@12
$ node -v
Huh, I thought that would work…

Step 2 – Remember that Node Version Manager exists

$ nvm current
$ nvm list
$ nvm install lts/erbium (this is node 12)
$ nvm list
$ nvm use lts/erbium
$ node -v

Step 3 – Discover that closing and reopening terminal causes node to go back to version 10

$ nvm alias default lts/erbium

Close/reopen terminal. Reboot. verify that “node -v” still says v12.16.2

Step 4 – Decide to write this down for next time

Then go get a coffee.