Content Insights Tip #54 | Change WSL default NodeJS version

Content Insights Tip Logo

 Some things are just so annoying for me, that they have to be changed. It was earlier today, that I was really fed up with setting my NodeJS version to the correct version when opening up my Visual Studio Code. I decided to see if it was possible to make a change. 

It turns out, that you can! By default, WSL defaults to the default alias when starting after a Windows reboot. I know, don't reboot... but this is Windows, you need to reboot now and then ;).Then cool thing, you can actually override the default with the following command:

nvm alias default [version_number]

Example

Change WSL default NodeJS version