

Nvm has a lot of subcommands such as install, use, uninstall, and more. We want to choose some important subcommands and explain them. Install a version of Node.jsįirst, you can get the list of available versions by list-remote or ls-remote subcommand. You can install a specific version by nvm with install subcommand. If you want to install the LTS version you can use -lts instead of version number. nvm install node Load a specific version of Node.js Or you can install the latest version with node instead of version number. Now you install some versions of Node.js on your machine So you can see the list of installed versions with list or ls subcommand. If you want to load a specific version, use use subcommand. With this subcommand, you can load Node.js by version number or -lts flag. Or use the latest version nvm use node Uninstall a Node.js versionįinally, If you want to uninstall a version of Node.js, you can use uninstall subcommand for that.įirst, you need to switch to another version with use then you can uninstall that. In the Node.js project, you can store the version of Node.js compatible with that in a file, they called it. nvmrc and you should create it at the root directory of your project. Nvm use # Found '/path/to/project/.nvmrc' with version # Now using node v14.17.6 (npm v6.14.15) Install a package on Node.js Then you can use the compatible version in other machines of your teammates.
