🔍Best Way To Manage nodejs

It is very common that you have multiple versions of nodejs. In this case, we recommend using nvm to manage the node versions.

If you have the node installed, try remove it using

brew uninstall node

Then you can install nvm instead

brew install nvm

Then you can follow the instructions:

Make sure you restart the terminal or run source ~/.zshrc

Then you can run this command to install node of a specific version

nvm install 16
nvm install 18

If you have multiple versions, you can use this command to switch versions

nvm use 18
nvm use 16

Last updated