The NVM (Node Version Manager) is a shell script used for installing and managing Node.js on a Linux based system. The macOS users can install NVM using the homebrew.
- Install Homebrew On Mac Catalina Mac
- Install Homebrew On Mac Catalina Operating System
- Unable To Install Homebrew On Mac Catalina
- Install Homebrew On Mac Catalina 2019
This tutorial help you to install NVM on your macOS system and manage Node.js versions.
Install PHP 7.3 + xdebug on MacOS Catalina (with homebrew) Homebrew have relocated “php” formulas and renamed “php71” into “php@7.1” in 2018 making it quite difficult to and also. How to install Homebrew on Mac What you need. Before you install Homebrew on Mac, you’ll need to make sure you have the following: A 64-bit Intel CPU or an Apple Silicon CPU (i.e., an M1 Mac) You can check if you have a compatible Mac by pressing cmd + spacebar, typing “About This Mac”, pressing return, and then checking the Processor. 👉 Note that the newest versions of macOS (Starting at Catalina) now uses zsh as a default instead of bash. Though, bash version 3 is still installed and available. To find out which macOS version you are running, check out my post How to Find which Mac OS version you are running? Upgrade Bash on Mac with Homebrew. Brew Macos Catalina Additionally, SUMO provides native macOS application bundles for its graphical applications, so they can be added to the macOS dock. There is a separate brew cask that will copy these bundles to the Applications folder: brew cask install sumo-gui.
Prerequisites
You must have macOS desktop access with administrator privileges.
Login to the macOS desktop system and install Homebrew on your system (if not already installed)
For more instruction visit Homebrew installation tutorial.
Step 1 – Remove existing Node Versions
If your system already have node installed, uninstall it first. My system already have installed node via Homebrew. So uninstalling it first. Skip if not already installed.
Step 2 – Install NVM on macOS
Now, you system is ready for the installation. Update the Homebrew package list and install NVM.
Next, create a directory for NVM in home.
Now, configure the required environment variables. Edit the following configuration file in your home directory
and, add below lines to ~/.bash_profile ( or ~/.zshrc for macOS Catalina or later)
Press ESC + :wq to save and close your file.
Next, load the variable to the current shell environment. From the next login, it will automatically loaded.
That’s it. The NVM has been installed on your macOS system. Go to next step to install Node.js versions with the help of nvm.
Step 3 – Install Node.js with NVM
First of all, see what Node versions are available to install. To see available versions, type:
Now, you can install any version listed in above output. You can also use aliases names like node for latest version, lts for latest LTS version, etc.
After installing you can verify what is installed with:
If you have installed multiple versions on your system, you can set any version as the default version any time. To set the node 14.X as default version, simply use:
Similarly, you can install other versions like Node 12.X or Node 15 and switch between them.
Conclusion
This tutorial explained you to how to install NVM and node.js on macOS system.
Installing Drush on MacOSX with Composer
In order to install Drush, you should first install Composer. Composer is often required for Drupal 8 and once Composer is installed, installing Drush is easy.
1. Open the Terminal app on your Mac.
2. Install Homebrew via the instructions here: https://brew.sh/
3. Install Composer globally on your Mac with this command:
brew install composer
4. If your computer doesn’t have a “/usr/local/bin” directory, create that first with this command:
sudo mkdir -p /usr/local/bin
…that creates the directory; you should be prompted to enter your computer’s password.
Now, when you type composer --version
and press Enter, we’ll see that you have Composer installed!
5. Install Drush via Composer:
Note!: Please do not install Drush using composer global require
. See Pantheon’s article, Fixing the Composer Global command.
Instead, first install the Composer global require
command:
composer global require consolidation/cgr
6. Add the vendor/bin
from the Composer home directory to your $PATH.
(Thereafter, you may substitute cgr
for any command line tool whose installation instructions recommends the use of Composer global require. Example: cgr drush/drush
)
If you get a popup to install the Xcode Developer tools, go ahead and install Xcode.
7. Update the system $PATH:
vim ~/.bash_profile
to edit the file press the i
key to enter Insert mode
…next, copy and paste this into that file:
Install Homebrew On Mac Catalina Mac
export PATH='$HOME/.composer/vendor/bin:$PATH'
PATH='$(composer config -g home)/vendor/bin:$PATH'
Press the Escape (esc) key to switch back to command mode.
Install Homebrew On Mac Catalina Operating System
Type :wq
and press Enter to save and quit the file.
Unable To Install Homebrew On Mac Catalina
8. Quit the Terminal app (or, run the “source” command to load the .bash_profile file without having to restart the Terminal.)
To run the source command:
source ~/.bash_profile
9. Now you will actually install Drush:
Install latest stable Drush:
cgr drush/drush
Install Homebrew On Mac Catalina 2019
Now if you type drush
and press Enter, you’ll see that Drush is installed, and working on your machine!