As a web developer these days, we typically need to be able to switch versions of Node on the fly, for this we want to install Node Version Manager on a clean install of our machine, we don't want to start by installin Node on it's own as this will give us a single version of Node (whichever we decide to install)
If you install Node first and then try to install NVM, things can get complicated, so if you have already installed Node, my suggestion is to completely remove it before installing NVM.
As well, NVM is explicitly not supported when installed via homebrew - the only correct way to install it is with the install script in NVM's Readme.
So if you have a brand new Mac M1 these are the steps you need to go through.
- Navigate to your home directory