Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL error on start #28

Closed
celinenguyen opened this issue Jan 25, 2019 · 5 comments
Closed

GraphQL error on start #28

celinenguyen opened this issue Jan 25, 2019 · 5 comments

Comments

@celinenguyen
Copy link

My issue is fairly similar to #17, but I'm using a newer version. Just cloned the repo a few minutes ago (on commit 832f18b). I ran the following commands:

gatsby new gatsby-starter-ghost https://github.com/TryGhost/gatsby-starter-ghost.git
yarn
gatsby develop

And here's the error I'm receiving:

GraphQL Error Unknown field `file` on type `Query`

  file: /Users/Celine/…/gatsby-starter-ghost/src/components/common/Layout.js

   1 | 
   2 |             query GhostSettings {
   3 |                 allGhostSettings {
   4 |                     edges {
   5 |                         node {
   6 |                             ...GhostSettingsFields
   7 |                         }
   8 |                     }
   9 |                 }
> 10 |                 file(relativePath: {eq: "ghost-icon.png"}) {
     |                 ^
  11 |                     childImageSharp {

If it helps, I'm on Mac OS X, npm 6.5.0, Gatsby 2.4.8, yarn 1.11.0. Haven't used Gatsby before, so apologies if this is quite basic!

@aileen
Copy link
Member

aileen commented Mar 4, 2019

Hey @celinenguyen 👋

Sorry for that delay here!

Did you sort this out in the meantime? If not, could you please tell me, if this file src/images/ghost-icon.png exists for you? It seems like it doesn't...

@PhilippCh
Copy link

The file exists for me and the error persists. Works on macOS, crashes on Windows.

@aileen
Copy link
Member

aileen commented Mar 25, 2019

This sounds actually as if it's related to the gastby-plugin-sharp, not this specific starter then: https://www.gatsbyjs.org/docs/gatsby-on-windows/#gatsby-plugin-sharp-requires-node-x64

Unfortunately, I have no way to test this on Windows. I'd recommend that you follow the setup steps as mentioned on the Gatsby page for Windows installs.

I'll close this issue, as it doesn't seem to be caused by the starter. We can reopen it, if it turns out that it's a bug indeed.

@aileen aileen closed this as completed Mar 25, 2019
@PhilippCh
Copy link

As of today the issue still persists, I've checked that I've installed node x64. Is there anything I can provide to aid in debugging?

@aileen
Copy link
Member

aileen commented Apr 5, 2019

There's not so much I can do here, as this is an issue with Windows and image-sharp. You could remove the dependency gatsby-plugin-sharp and only rely on the logo as set in your Ghost publication. The only place where it's used, is the Layout component here and here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants