Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
Go to file
2025-04-15 19:09:33 +05:30
.github [actions] release test needs git tags 2025-02-04 08:44:48 -08:00
test [Fix] reinstall-packages: do not reinstall corepack 2025-03-11 13:16:58 -07:00
.dockerignore [New] nvm use/nvm install: add --save option 2022-08-29 16:01:36 +01:00
.editorconfig [New] allow .nvmrc files to support comments 2024-06-07 10:13:00 -07:00
.gitattributes [meta] fix gitattributes to properly recognize images as binary 2023-11-22 22:29:01 -08:00
.gitignore [Tests] fix broken tests exposed by 863bd63 2024-08-27 12:46:40 -07:00
.gitmodules [New] allow .nvmrc files to support comments 2024-06-07 10:13:00 -07:00
.mailmap Add a Git .mailmap with my new name 2017-10-04 12:55:41 +02:00
.npmrc Only apps should have lockfiles 2017-10-05 13:34:54 -07:00
.travis.yml [Tests] migrate installation_iojs test suite to GitHub Actions 2024-11-21 15:14:14 -08:00
bash_completion [Fix] bash_completion: be robust when cd is overridden 2021-09-13 15:26:40 +03:00
CODE_OF_CONDUCT.md [meta] use HEAD instead of master where possible 2022-12-23 12:53:40 -08:00
CONTRIBUTING.md [meta] add DCO 2024-11-05 17:51:39 +00:00
Dockerfile [readme] add docker tips 2022-11-14 00:16:13 +01:00
GOVERNANCE.md [meta] add project charter and governance 2021-04-26 12:56:08 -07:00
install.sh v0.40.2 2025-03-11 13:39:40 -07:00
LICENSE.md [meta] add copyright line to license file 2019-07-17 10:48:23 -07:00
Makefile [Tests] move sourcing suite to GHA 2024-08-22 13:30:55 -07:00
nvm-exec [Fix] nvm exec: no longer error with '-q: invalid option' for zsh users 2023-04-21 20:40:01 -07:00
nvm.sh [Fix] nvm_install_latest_npm: fix node version detection 2025-04-09 08:16:05 +03:00
package.json v0.40.2 2025-03-11 13:39:40 -07:00
PROJECT_CHARTER.md [meta] add project charter and governance 2021-04-26 12:56:08 -07:00
README.md 📝 docs: improve note for Zsh users in README 2025-04-15 19:09:33 +05:30
rename_test.sh [meta] Rename some files to be more cross platform 2021-01-04 00:49:05 +01:00
ROADMAP.md [meta] update repo links to point to org 2019-04-24 16:08:34 -07:00
update_test_mocks.sh [Refactor] add nvm_wrap_with_color_code; allow no color code 2022-10-13 20:16:42 -07:00

nvm project logo

Node Version Manager (NVM)

Build Status nvm version CII Best Practices


Node Version Manager (NVM) is a versatile tool that empowers developers to manage multiple Node.js versions effortlessly. With NVM, switching between Node.js versions becomes seamless, ensuring compatibility and flexibility for diverse projects.


Table of Contents


Introduction

NVM simplifies the process of managing Node.js versions, making it an indispensable tool for developers working on varied projects. With just a few commands, you can install, switch, and manage Node.js versions effortlessly.

Example Usage:

nvm use 16
# Now using node v16.9.1 (npm v7.21.1)
node -v
# v16.9.1
nvm use 14
# Now using node v14.18.0 (npm v6.14.15)
node -v
# v14.18.0
nvm install 12
# Now using node v12.22.6 (npm v6.14.5)
node -v
# v12.22.6

About NVM

NVM is a version manager for Node.js, designed to be installed per-user and invoked per-shell. It works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash) and supports platforms like Unix, macOS, and Windows WSL.


Installation and Updates

Install & Update Script

To install or update NVM, run the following script using either curl or wget:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash

This script clones the NVM repository to ~/.nvm and updates your shell profile to load NVM automatically. If the script updates the wrong profile file, set the $PROFILE environment variable to the correct file path and rerun the script.


For more details, refer to the full documentation.