GraphQL thinks GhostPage is an unknown type. Is this a bug?


I’m trying to get Gatsby going on my production server. Had no issues till the point I tried to build with Netlify.

The log says:

error GraphQL Error Unknown type “GhostPage”. Did you mean “GhostTag”, “GhostPost”, “GhostTagEdge”, or “GhostPostEdge”?
file: /opt/build/repo/src/utils/fragments.js

I cloned the repo from the official gatsby starter pack.

Looking at the file it looks like single pages created in ghost will be supported. But the log says it is an unknown type.


Hmm, gatsby-source-ghost has some special code to ensure that there is at least one node of each type in the system, as otherwise Gatsby will error:

It’s a bit of a hack, so it may have stopped working - I know Gatsby are working on a more official method.

Do you definitely have a page in your source Ghost site?
What version of Gatsby are you using?
When did you clone the starter?
Did you make any significant changes?

  1. Oh dang. I didn’t have a page.

However, it wasn’t successful either. I went ahead and created one and added a tag for it. Got this error:

5:13:01 PM: failed during stage ‘building site’: Build script returned non-zero exit code: 1
5:13:02 PM: file: /opt/build/repo/src/utils/fragments.js
5:13:02 PM: 1 |

To answer your questions:
2. I just followed the installation mentioned in the readme file. I’m not sure which version of Gatsby I am on. Any cmd to check that?
3. I cloned the starter yesterday.
4. I’ve made quite a few changes to ghost in the sense that I updated the routes, so I can have a custom html file as my landing page and ghost’s other content as a collection. But didn’t make any changes to the gatsby other than adding a 301 redirect on the _redirects file


I just did a re-install of gatsby and it worked fine this time. Not sure what went wrong the last time. :man_shrugging:

closed #5

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.