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
v10.17.0

Step 1 – Remember Brew Exists

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

Step 2 – Remember that Node Version Manager exists

$ nvm current
v10.17.0
$ nvm list
$ nvm install lts/erbium (this is node 12)
$ nvm list
$ nvm use lts/erbium
$ node -v
v12.16.2
Yay!!

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.