Deal with different versions of Node installed in your system.

Some packages require another version of node or have different performance while running under different versions. When you are using a package manager to manage your dependencies for large projects you can find out that when you upgrade/switch to another especific version you can get some errors because some of de dependencies require different versions of node than the one you are using.
1 answer

Deal with different versions of Node installed in your system.

The best way to deal with different versions of node is to install the Node Version Manager (nvm) using Homebrew.
You just need to write the following command in your terminal:

brew update
brew install nvm
mkdir ~/.nvm
nano ~/.bash_profile

and make sure that you add this to your .bash_profile:

export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh

Now you can just use the command nvm from your terminal to simply install and manage new versions of Node in your computer.

Taggings: