panr / gatsby-starter-hello-friend

Pretty basic starter for Gatsby that covers all of the essentials. All you have to do is start typing!
MIT License
165 stars 71 forks source link

Installation Instructions? #3

Closed slimandslam closed 5 years ago

slimandslam commented 5 years ago

Are there installation instructions somewhere? I don't see them.

panr commented 5 years ago

HI @slimandslam first you have to clone repo:

[in terminal]

git clone https://github.com/panr/gatsby-starter-hello-friend.git

then switch to directory where you keep this repo, probably just:

cd gatsby-starter-hello-friend

and for starting localhost server:

gatsby develop

and in browser go to localhost:8000.

And here's how you can configure this starter -> https://github.com/panr/gatsby-starter-hello-friend#how-it-works

mkempster22 commented 4 years ago

Following the installation instructions I only get

Gatsby.js development 404 page
There's not a page yet at /

Preview custom 404 page

Create a React.js component in your site directory at src/pages/index.js and this page will automatically refresh to show the new page component you created.

If you were trying to reach another page, perhaps you can find it below.

Pages (2)
Search:
Search pages...
/404/
/404.html

the 404 page works fine but all other pages including the about page that is pre created don't work

panr commented 4 years ago

@mkempster22 hard to say, what's wrong... I've just cloned this repo again to find out if there's something wrong with the setup, but everything... works on my machine...

Try to add src/page/index.js as an empty file and let me know if this works, ok?

mkempster22 commented 4 years ago

Looks like i'm getting an error during runtime for a plugin. I'll have a look round whats wrong with my installation

ERROR #11321  PLUGIN

"gatsby-node.js" threw an error while running the createPages lifecycle:

Cannot return null for non-nullable field Frontmatter.path.
jyoo commented 4 years ago

It would be quite late to leave a comment, but I had encountered the exact same error.

 ERROR #11321  PLUGIN

"gatsby-node.js" threw an error while running the createPages lifecycle:

Cannot return null for non-nullable field Frontmatter.path.

  Error: Cannot return null for non-nullable field Frontmatter.path.

failed createPages - 0.034s

In my case, I added some posts in posts directory before running gatsby build, and saw the above error. In some posts, I forgot to add path in the Front Matter. Checking Front Matter in your posts might be helpful!

panr commented 4 years ago

Did you set a path value in frontmatter? It looks like you have null (= is empty)