This guide will help you install Yarn. You can check if Yarn is installed on your PC with the command yarn --version

A. Install Yarn only for Mac OS using Homebrew

  1. Open your Terminal and install Homebrew:

    /bin/bash -c "$(curl -fsSL [<https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>](<https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>))"

    If you already have this, skip to step 3

  2. Since you have the M1 chip, run the following command to add brew to your PATH:

    echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc

    After, close the terminal and open it again to apply changes.

  3. Use Homebrew to install yarn:

    brew install yarn

  4. Navigate to the folder that contains the code via Terminal. Unless you have moved it, it should be in your Downloads. Make sure you have unzipped the folder.

    cd Downloads

    cd folder_name

  5. Run the code

    yarn dev

    It should look like this

    Untitled

  6. Note the link where the project is running, and open it in your browser.

All done!

B. Installing Yarn using npm

  1. Open a terminal with administrator rights. If you're using Windows, you can run a command prompt as an administrator by right-clicking on the "Command Prompt" icon and selecting the "Run as administrator" option. After that, you can use NPM with admin rights. On Mac OS, you can use the sudo command at the beginning of a command.

  2. Navigate to the folder that contains the code via Terminal. Unless you have moved it, it should be in your Downloads.

    cd Downloads

    cd folder_name Make sure you have unzipped the folder.

  3. Download the latest LTS version of Node from https://nodejs.org/en and install it. You can check the installation and version of Node with the command node -v.

  4. Install Yarn (make sure you have admin rights), for windows npm install --global yarn , for Mac OS sudo npm install --global yarn . If it asks for the password, then enter it. You can check the installation and version of Yarn with the command yarn --version .

  5. yarn install

  6. yarn dev It should look like this

    Untitled

  7. Note the link where the project is running, and open it in your browser.

All done!