How to setup multiple node version in same system

Ashish Kasama|December 14, 2022|2 Minute read|
Play
/ / How to setup multiple node version in same system

SHARE

facebooktwitterwhatsapplinkedin
facebook
twitter
whatsapp
linkedin

There are a few ways you can manage multiple Node.js versions on the same system. Here are a couple of options:

  1. Use a version manager: A version manager allows you to easily switch between different versions of Node.js. Some popular version managers for Node.js include nvm (Node Version Manager) and nodenv.

    To use a version manager, you will need to install it on your system. Once it is installed, you can use it to install and switch between different versions of Node.js. For example, with nvm, you can use the following commands:
    • To install a specific version of Node.js:
      nvm install 12.18.3
    • To use a specific version of Node.js:
      nvm use 12.18.3
    • To see a list of all installed versions of Node.js:
      nvm ls
  1. Use multiple versions of Node.js side by side: Instead of switching between different versions of Node.js, you can also install and run multiple versions of Node.js side by side. This allows you to use a specific version of Node.js for each of your projects.

To do this, you can download and install the desired version of Node.js from the official website (https://nodejs.org/en/download/). Make sure to install each version in a separate directory, and then you can use the appropriate version for each of your projects.

It is also worth noting that some operating systems include tools for managing multiple versions of Node.js, such as the "nodenv" package on macOS. These tools can make it easier to manage multiple versions of Node.js on your system.

Ashish Kasama

One-stop solution for next-gen tech.

Related Blogs

The latest from our innovation team

SEE ALL