How to Install NVM and Node on macOS M1 Silicon in 2022
If you’re a software engineer with a Mac, having NVM and Node installed is likely a requirement. In 2022, it’s easier than ever to get this all installed and check it off your to-do list.
There are a ton of articles out there about installing NVM and Node, however, many of them are a bit outdated or not detailed enough. To address those gaps, this article makes it easy to get NVM and Node on a new Mac. Let’s dive in!
Step 1: Get NVM
Open a new terminal window. Run the following command to see if you already have a .zshrc profile or not:
If you see .zshrc in the list, skip this step. Otherwise, if you don’t see it, that means you don’t have it, and you need to create one by running this command:
Now you definitely have a .zshrc profile, which means you can get NVM. Visit this site to find the NVM cURL install command under the section called Install & Update Script. The command looks similar to this:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
Copy that command and enter it into your terminal. This installs NVM and makes it available for use.
Since this installation influences your .zshrc profile, you need to run this command to refresh things:
NVM is installed! You can just run the command
nvm to confirm this.
Step 2: Get Node
To install Node, just run this command in your terminal:
nvm install node
Node is now downloaded but you need to run the following command to actually use it:
nvm use node
Step 3: Confirm Everything Works
Okay, it’s time to double-check that everything works. You can run the following commands to make sure you’re using versions Node, NPM, and NVM: