Install the Latest Version of Gatsby

Share this video with your friends

Send Tweet

In this lesson, you’ll learn how to install the latest version of Gatsby and the barebones “Hello World” starter.

You will use the global Gatsby CLI tool to initialize a project with the starter template that the Gatsby team makes available to us.

Dealing with deprecation, please refer to notes.

Dev
Dev
~ 6 years ago

Installing the tool with npm; installing its deps with yarn... 🤔

Taylor Bell
Taylor Bell(instructor)
~ 6 years ago

You can run either of these just fine: yarn global add ... or npm install -g ...

There's not really an exact reason. For global installations I like npm's install -g command more for some reason. It feels shorter to type or something, even though there's only a one character difference.

Similarly when installing dependencies, I like yarn add because it feels faster.

The end result is the same, so choose your own adventure :)

Rob
Rob
~ 6 years ago

The v2 branch is no longer present on the gatsbyjs/gatsby-starter-hello-world starter project so the command is

gatsby new my-blog https://github.com/gatsbyjs/gatsby-starter-hello-world