Last Updated on January 29, 2023 by Vikash Ekka
Node Version Manager (NVM) is a command-line tool for managing and switching between different versions of Node.js, which is a JavaScript runtime built on Chrome’s V8 JavaScript engine. NVM allows you to install and use multiple versions of Node.js on the same machine, and switch between them easily. This can be useful if you are working on multiple projects that require different versions of Node.js, or if you want to test your code against multiple versions of Node.js.
This tutorial will show you how to install NVM on your macOS system and manage Node.js versions.
Prerequisites
- macOS system with access with administrator privileges
- Internet
Install Homebrew on macOS
To install the Homebrew on macOS follow the instruction Link
Install NVM on macOS
Step 1. To install NVM, you can use the following command MacOS):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
Step 2. Once you’ve installed NVM, you can use the following command to see a list of available Node.js versions:
nvm ls-remote
Step 3.You can use the following command to install a specific version of Node.js:
nvm install 12.18.4
Step 4. You can also use the following command to see the version of Node.js that is currently in use:
nvm current
Step 5. and you can use the following command to switch to a different version of Node.js:
nvm use 12.18.4
These are the basic usage of NVM. For more options and functionality you can check out the official documentation: https://github.com/nvm-sh/nvm
Conclusion
You have successfully installed the NVM on macOS . Let us know in the below comment box if you are facing any issue. We will happy to assist you.
Happy Learning !!!
FAQ
Q. How to install nvm on mac terminal ?
A. Follow the above steps to install nvm on macos
Q. How do I find my nvm version on Mac?
A. Check above step. 4
Q. Where are nvm files located on mac
A.