This is a guide for new MacBook users to set up their devices for development purposes.

Install Homebrew

Homebrew is a free and open-source software package management system that simplifies the installation of software on Apple’s operating system, macOS, as well as Linux. It is the most popular package manager for macOS, it helps install and manage different applications and software.

How to install Homebrew?

  1. Visit their website **https://brew.sh/**

  2. Copy the command from there and run it in your terminal  */bin/bash -c “$(curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>)"*

  3. Warning: /opt/homebrew/bin is not in your PATH, usually, we get this warning while the installation. It means that we need to add path for brew in the terminal config file

  4. Use command giving below the warning to add the path in .zprofile ‘eval “$(/opt/homebrew/bin/brew shellenv)”’ >> /Users/kartik/.zprofile eval “$(/opt/homebrew/bin/brew shellenv)” or add export PATH=/opt/homebrew/bin:$PATH line in .zprofile file and run source ~/.zprofile or restart the terminal

  5. Visit their website https://brew.sh/ to find install applications on your device eg. brew install --cask google-chrome

  6. Check by running the command brew -v

Install Node Version Manager (nvm), Node, and Node Package Manager (npm)

As the name suggests Node version manager helps install and use any specific version of Node.

How to install nvm?

  1. Run command brew install nvm in your terminal to install nvm (https://formulae.brew.sh/formula/nvm)
  2. Again we have to add path for nvm in .zprofile
  3. run this command to open the file open ~/.zprofile
  4. Add the path  export NVM_DIR="$HOME/.nvm"  . "/opt/homebrew/opt/nvm/nvm.sh"
  5. Run command source ~/.zprofile or restart the terminal
  6. Check by running the command nvm -v

How to install Node?