I have been working with Node a lot lately and one of my frustrations was getting the Node Version Manager (NVM) to recognize a default version. After some google searching, I found some answers and after some trial and error, I found a solution that works on both my desktop development machine (Ubuntu 14.04 LTS) and my Macbook Pro running OSX El Capitan.
Set Default Node Version in NVM
Step 1: Set current version. At the time of this post, node 5.1.0 is most recent stable version installed on both systems.
nvm use 5.1.0
Step 2: Set alias default.
nvm alias default 5.1.0
Step 3: Exit and reopen your terminal emulator. Test by checking current version:
In both cases, on Ubuntu and OS X, I was able to verify that I am now using
v.5.1.0 as my default version.
Please comment with questions, suggestions or improvements. Happy coding!