Learn about installing local dependencies.
- [Instructor] Throughout this course we're going to be accessing a number of programs via our command line, which you'll need to have installed on your local machine and running globally. Specifically, we're going to be installing Yarn, Heroku, and Create React App via Homebrew. Let's get started now, and see how we do that. I should say, if you have these applications already running on your machine, feel free to skip this video and move on to the rest of the course. The first application we're going to install is Homebrew. Homebrew says that it calls itself the missing package manager for MAC OS.
We could go visit their site, and copy and paste this command and enter it into our command line. You'll see here that sometimes it might ask you for a password to install an application into your root directory. That's fine, I'm going to do that. Now that I have Brew available, Brew is the tag that Homebrew uses, I can begin to install some of my other tools. The next one I'm going to do is Heroku's command line tool. Heroku offers a number of tools for developers that allow them to quickly and easily deploy applications to the internet using a simple GIT repository-like interface.
Here are some instructions on how to download Heroku CLI. But we can actually just install it over Homebrew with Brew install Heroku. Next we can check that it's working from the command line by typing Heroku dash v. Next, we're going to install Yarn. Yarn calls itself a fast, reliable, and secure dependency management tool. And if you've heard about it, it's often spoken of as a replacement to NPM. In this course, we're going to be using Yarn instead of NPM, and if that seems a little intimidating, don't worry.
It gives you the access to the same packages that you had on NPM, and it just does some work behind the scenes to make sure that your packages are up to date. It looks like my first installation attempt failed. And this might be a problem you could encounter. When I checked the error, I see that it's missing write access to user local lib node modules. This is a pretty common problem, and it's easy to fix. I'm just going to prefix my command with sudo. So I say sudo NPM install yarn dash g, to say that I want this globally.
And then I put in my administrative password. And things should work as I want this time. Now, the last application that I need to install is called Create React App. Create React App is a command line tool created by the Facebook incubator project that allows you to quickly create a new starter project. I'm going to install it on my machine, and I'm going to say sudo again, just because we had that problem earlier.
And I'm going to make sure it's available globally. Great, now that I have Create React App, Heroku and Yarn, I'm ready to begin development.
- Installing local dependencies
- Generating a starter project
- Deploying to Heroku
- Planning your development process
- Using styled-components
- Styling for mobile
- Setting up models on Graphcool
- Creating Relay mutations
- Adding Relay to your authentication flow
- Protecting routes with authentication