NVM (Node Version Manager) Documentation
Introduction
NVM (Node Version Manager) is a tool that allows you to manage multiple installations of Node.js and npm. It provides an easy way to switch between different Node.js versions based on your project requirements.
Installation
To install NVM, run the following command in your terminal:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
or using wget
:
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
Troubleshooting
In case of error NVM not found, copy the code below and run it:
source ~/.nvm/nvm.sh
Usage
After installation, you can start using NVM to manage Node.js versions:
- nvm install [version]: Install a specific Node.js version.
- nvm use [version]: Use a specific Node.js version in the current shell.
- nvm ls: List installed Node.js versions.
- nvm alias default [version]: Set a default Node.js version to be used.
Updating
To update NVM to the latest version, run the following command:
nvm install node --reinstall-packages-from=node
Uninstallation
If you wish to uninstall NVM, run the following command:
rm -rf ~/.nvm
No comments:
Post a Comment