devblog icon indicating copy to clipboard operation
devblog copied to clipboard

Probably important: vanilla install won't create pages

Open SecondeJK opened this issue 6 years ago • 7 comments

SecondeJK avatar Jun 26 '19 22:06 SecondeJK

When running gatsby develop after cloning the repo and running npm:

success onPreBootstrap - 0.011 s
success source and transform nodes - 0.063 s
success building schema - 0.254 s
Your site's "gatsby-node.js" must set the page path when creating a page

Blog doesn't compile, presumably because of a problem here: path: post.node.fields.slug, In the gatsby-node.js file.

This might not be an issue, maybe just GraphQL is returning no edges on compile for some reason

SecondeJK avatar Jun 26 '19 22:06 SecondeJK

This seems to be correct, GQL can't find fields on each node edge.

SecondeJK avatar Jun 30 '19 18:06 SecondeJK

OK, the createPaginatedPages() method isn't documented correctly over on that plugin's docs in that it doesn't specify that the pathPrefix is required (or this is using it in a context where a default value won't work). Without it, the config won't resolve the base path when compiling the index. I'll issue a PR to fix this.

SecondeJK avatar Jun 30 '19 20:06 SecondeJK

#11

SecondeJK avatar Jun 30 '19 21:06 SecondeJK

Sorry for a bit of a delay getting to this. This definitely looks like an issue, thank for bringing it up and for taking the time to put together a PR! I'll be able to to take a look at the PR shortly.

RyanFitzgerald avatar Jun 30 '19 23:06 RyanFitzgerald

@SecondeJK, did you do anything in particular leading up the error? I'm trying to reproduce the problem but it seems to compile successfully for me (when running gatsby develop).

RyanFitzgerald avatar Jul 01 '19 02:07 RyanFitzgerald

That is really weird that it flat out refuses to compile with no mods* (see below) Details are - Ubuntu 18.04 npm 6.9.0 node 12.5.0

The only problem I encountered before compiling was having to fix gatsby-snap, which for some reason was just complaining. I manually installed the latest and created a new lockfile. Rendering the images -shoudn't- affect how gatsby ends up compiling the paginated index though...?

SecondeJK avatar Jul 01 '19 22:07 SecondeJK