![]() Or to use a certain version of Node.js: $ nvm use 17.0.1 Change Default Version Use lts/* alias to switch to v16.13.2: $ nvm use lts/* Print out the list of installed Node.js versions: $ nvm list v16.8.0 The same goes with uninstalling: $ nvm uninstall 17.0.0 Switch Versions To install a certain version of Node.js and migrate the NPM global packages from the current version: $ nvm install 17.0.0 -reinstall-packages-from=current Uninstall Versions To install the LTS (Long Term Support) version of Node.js: $ nvm install -lts ![]() To install the latest version of Node.js: $ nvm install node To remove, delete, or uninstall nvm - just remove the `$NVM_DIR` folder (usually `~/.nvm`) Nvm -version Print out the installed version of nvm custom aliases you define with `nvm alias foo`Īny options that produce colorized output should respect the `-no-colors` option. default (built-in) aliases: node, stable, unstable, iojs, system full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1) Note: refers to any version-like string nvm understands. Or to force an update:įor the full usage guide, use -help: $ nvm - help Node Version Manager (v0.39.1) If you got nvm: command not found, you might need to restart the terminal session for the shell configuration to work. It's good practice to review the shell scripts before executing them. Install NVM with install.sh from its latest release, change v0.39.1 if a newer version is released: And the best part is NVM is just a Bash script, truly a lightweight helper for both testing and production.ĭownloading binaries from Node.js and updating them manually every now and then is not a pleasant thing to do, and installing Node.js via package manager is usually not a good idea since it's not maintained by the core team and often outdated: Notice on the official website of Node.js Installation It can install different versions of Node.js and NPM on a single machine, switch versions anytime you wish. Managing Node.js versions on Linux is no longer a pain in the ass with NVM (Node Version Manager).
0 Comments
Leave a Reply. |