<你好>


Using Multiple Versions of Nodejs

I love Nodejs 😍 , you love Nodejs everybody loves it. 💖

A lot of JavaScript libraries 📚 use Nodejs but are not always compatible with different versions of Nodejs, so developers will have to do some tweaking and upgrading for the libraries to work with different versions.

I recently started venturing 🕵 into the world of IDEs (Integrated Development Environment) and Text Editors and I thought what better place to start than the infamous VSCode. If you take one step into the World of Web Development you would not go far without bumping into this Text Editor because it supports almost all Web Development Languages, Frameworks and Libraries not forgetting its vibrant Visual Studio Extensions Marketplace where you can find many extensions and plugins.

Since VSCode is Open Source I hurried to their repository skipping everything until I found the part where they explain about "Building from Source", more specifically for Windows. As one the requirements to Build VSCode from source as of the date this Blog is written you need to have Nodejs version 14x. This completely stopped me in my tracks because I was using a later version of Nodejs which was powering many important projects I was working on and I could not risk installing another version.

A quick Google Search...I lie 😂 I do not use Google,,,,. A Quick(quack) Duck 🐦 Search and I had found the solution. If you have not figured it out by now I use Duckduckgo instead of Google. Back to the main topic, it was pretty simple actually , could not believe I did not know about this. One acronym! . . . 'NVM' , which stands for Node Version Manager. A bit more ducking 🐦 (googling) and I found this gem 💎 NVM-Windows 💎 created by Corey Butler 👨🏼 , what an awesome lad.

Everything was fast and smooth after that, just download the installer......install......type in nvm into your terminal and it should show you a List of commands and what they do.

But...maybe a simple tutorial won't hurt right. 📝

  1. Remove all versions of Nodejs on your Computer.
  2. Install NVM-Windows
  3. Open Terminal (cmd etc)
  4. Type in nvm to see if the install was successful
  5. Type in nvm ls available
  6. Look for the version you want
  7. Type in nvm install [Node js Version] e.g nvm install 16.13.0
  8. Install another one hahahaha
  9. Type in nvm list to see the Nodejs Versions you have installed
  10. Type in nvm use [Node js Version] e.g nvm use 16.13.0. This will be the active Nodejs Version

Thats all, If you have any questions get in Contact