To install Node.js using nvm (Node Version Manager), follow these four steps:
- Install nvm: Download and install nvm, a tool for managing multiple Node.js versions, by executing the installation command provided by the nvm documentation for your operating system.
Download Install nvm
Releases · coreybutler/nvm-windows (github.com)
Using nvm-setup.exe for windows - Open a new terminal: After nvm is successfully installed, open a new terminal window or tab to ensure the changes take effect.
- Install Node.js: Run the following command in the terminal to install the latest stable version of Node.js:
nvm install 18 nvm use 18
- Verify the installation: To verify that Node.js is installed correctly, run the following command:
It should display the installed Node.js version.
That’s it! You have now installed Node.js using nvm.