NVM is a very useful node version manager

NVM installation command

1. Open a terminal input curl – o – https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash

2. If an error to Failed to connect to port 443 raw.githubusercontent.com: Connection refused to bind the host 199.232.68.133 raw.githubusercontent.com

3. If the terminal displays the need to agree to the Xcode protocol, you can use the command line interface to agree to the xcode protocol, or directly click the Xcode client to agree to the xcode protocol

If Command is not found, restart the terminal. If Command is not found, you may need to change the default shell. If it is not bash, the command is not available after installation.

We need to change the default shell to bash. See how to change the default shell on the Apple website.