Gatsby: Why gatsby command not found but runs using npm run build?

Created on 8 Nov 2018  路  2Comments  路  Source: gatsbyjs/gatsby

I'm trying to build using gatsby build but it says gatsby command not found.

Whereas npm run build runs the gatsby build

It's because Gatsby CLI or whatever is missing?

question or discussion

Most helpful comment

@Steffi3rd please install gatsby-cli to directly run gatsby commands like develop, build, serve, etc.

If you don't install, you'll need to run it using either npm or yarn.

All 2 comments

@Steffi3rd please install gatsby-cli to directly run gatsby commands like develop, build, serve, etc.

If you don't install, you'll need to run it using either npm or yarn.

Perfect, thank you!

Was this page helpful?
0 / 5 - 0 ratings