Software Setup

Written by Kashif Nazir, updated by Michael

Below you'll find information on how to set up your development environment for the course based on your operating system. If you encounter any issues, please reach out to the course staff on the forum or stop by office hours.

The Command Line

If you have not used the command line (also known as the terminal) before, please review our introduction to the command line.

Contents

Install and configure a text editor (all platforms)

You will need a text editor that can edit HTML, CSS, and JavaScript files. You are free to use any editor or IDE of your choice; however, our recommendation (and the editor we will use in lecture) is VSCode.

You can download and install VSCode for your operating system. Here are a few configuration tips once you have it installed:

Instructions for Windows

  1. (Optional) Install Git: Git is a version control system that helps you manage your projects. It lets you view, compare, and take snapshots of changes you make. While not required for the work in this course, it can be very useful, especially for the final project, and is widely used in other courses and in the real world.
    • Download Git here.
    • When installing, make sure to check the boxes that enable symbolic links and install additional unix tools. This will improve your development experience, especially when working with others' projects.
    • For more information on how to use Git, check out CS107's Git guide.
  2. Download Node.js. Make sure to choose the LTS (long-term support) version. Run the downloaded installer and follow the steps. This will also install NPM, node's built-in package manager.
  3. Follow the steps to verify your setup.

Instructions for macOS

  1. (Optional) Git: Git is a version control system that helps you manage your projects. It lets you view, compare, and take snapshots of changes you make. While not required for the work in this course, it can be very useful, especially for the final project, and is widely used in other courses and in the real world.
    • Git is already installed on macOS. For more information on how to use it, check out CS107's Git guide.
  2. Open the Terminal app.
  3. Install Homebrew by pasting the command at that website into the terminal. Homebrew is a package manager for macOS that helps you install software. Many development tools are provided through it.
  4. On some newer systems, you may see a message that says Warning: /opt/homebrew/bin is not in your PATH. If so, run the suggested commands under "Next Steps."
  5. Next, run brew update to update Homebrew's list of packages.
  6. Install Node.js version 18 and NPM (node's built-in package manager) by running brew install node@18.
  7. Link the newly installed version of node by running brew link --force --overwrite node@18.
  8. You'll also likely need to grant Terminal "Full DIsk Access", or else programs you run from the Terminal won't be able to create files. To do this, System Settings (or System Preferences depending on your macOS version), Privacy and Security, Full Disk Access, and check the box for Terminal.
  9. Follow the steps to verify your setup.

Instructions for Linux

This depends heavily on your Linux distro. You will need the latest Node.js LTS (version 18) and NPM. Here are the instructions for Ubuntu:

  1. Open your terminal (e.g. by pressing Ctrl+Alt+T).
  2. (Optional) Git: Git is a version control system that helps you manage your projects. It lets you view, compare, and take snapshots of changes you make. While not required for the work in this course, it can be very useful, especially for the final project, and is widely used in other courses and in the real world.
    • Git may already be installed. Try running git in a terminal. If it is not installed, you may see a message about how to install it, e.g. sudo apt install git.
    • For more information on how to use Git, check out CS107's Git guide.
  3. Add the PPA to your system by running: curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -. This is needed because the version of Node in Ubuntu's repo varies by OS version, but is often somewhat old.
  4. Install Node.js and NPM by running: sudo apt install nodejs
  5. Follow the steps to verify your setup.

Verify Your Setup

  1. Open your command line.
  2. Verify that Node.js is installed by running the command node -v. You should see a version beginning with 18. For example:
    $ node -v
    v18.15.0

    Note: If you have a newer version of Node (e.g. 19), you should be okay. We recommend Node 18 based on its longer support window.
  3. Verify that NPM is installed by running the command npm -v. The specific NPM version should not matter. For example:
    $ npm -v
    8.19.2
  4. If both of the above commands print out a number and no error messages, you should be all set! It's okay if the numbers you get don't match these exactly.