Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install different versions of NodeJS

Is it possible to have different versions of NodeJS installed on the same machine?

like image 416
Xitrum Avatar asked Dec 10 '11 08:12

Xitrum


People also ask

Can I install different version of node?

As on the same machine, we can only install one version of the nodejs, so it's very painful to uninstall and install the new node version as per your project requirements. To overcome this problem, we can use the Node Version Manager (NVM).

How do I use different versions of node JS?

To switch to a different version of Node. js, use the nvm command use followed by the version of Node. js you would like to use: nvm use 0.10.

How do I install a specific version of Nodejs?

Use npm list [package-name] to know the specific latest version of an installed package. Use npm install [package-name]@[version-number] to install an older version of a package. Prefix a version number with a caret (^) or a tilde (~) to specify to install the latest minor or patch version, respectively.


1 Answers

There are several node managers which you can use to achieve this, but the most popular are:

  • NVM
  • n
like image 147
alessioalex Avatar answered Oct 12 '22 07:10

alessioalex