Copyright Derek O'Reilly, Dundalk Institute of Technology (DkIT), Dundalk, Co. Louth, Ireland.
We can use nvm (node version manager) to install Node.js on a Windows computer.
Download the nvm-setup.exe file from this link.
Run the nvm-setup.exe file to install nvm. You should accept the default folder settings that are presented during the installation.
nvm runs via the windows "cmd" shell.
Open the "cmd" shell from the start menu, as shown below.
Node.js is installed using nvm within the cmd shell.
We shall install Node.js version 4.5.0
Inside cmd type the line below. This will install Node.js
nvm install node 4.5.0
We can use nvm to install multiple version of Node.js. This can be useful over time, as we should tie each application that is released to the version of Node.js that it was developed with. This will ensure that we do not break legacy code as a result of future releases.
Install a second version of Node.js using the command below
nvm install 8.11.0
There are now two versions of Node.js on your computer. We can list all of the installed versions of Node.js using the command below.
Running the above command will result in the screen below.
Type the command below to select the version of Node.js that you wish to use (You need administrator rights to run this).
nvm use 4.5.0
You can test that Node.js has been installed by running the command below
When nvm installs Node.js, it also install npm (node package manager). Type the command below to confirm that some version of npm was installed.
NOTE: nvm only needs to be installed once. It can then be used to set up any number of Node.js projects.
Copyright Derek O' Reilly, Dundalk Institute of Technology (DkIT), Dundalk, Co. Louth, Ireland.