Giter Club home page Giter Club logo

Comments (10)

styxlab avatar styxlab commented on August 25, 2024

Can you please publish your gatsby version when you are in the work directory?

[gatsby-theme-try-ghost]$ gatsby -v

Also have a look at #63 for running this project on Windows.

from gatsby-theme-try-ghost.

enryIT avatar enryIT commented on August 25, 2024
gatsby -v
Gatsby CLI version: 2.12.21

from gatsby-theme-try-ghost.

enryIT avatar enryIT commented on August 25, 2024

Please note, the starter works fine, this problem only occurs on the development repo where all packages are present.

from gatsby-theme-try-ghost.

styxlab avatar styxlab commented on August 25, 2024

Could you please run:

yarn run pack

and then yarn develop again?

from gatsby-theme-try-ghost.

enryIT avatar enryIT commented on August 25, 2024
yarn run pack
yarn run v1.22.4
$ lerna run build --scope={$(ls ./packages | xargs echo | sed 's/ /,/g')}
lerna notice cli v3.21.0
lerna notice filter including "{gatsby-plugin-ghost-images,gatsby-rehype-ghost-links,gatsby-rehype-inline-images,gatsby-rehype-prismjs,gatsby-theme-ghost-commento,gatsby-theme-ghost-contact,gatsby-theme-ghost-dark-mode,gatsby-theme-ghost-toc,gatsby-theme-try-ghost,gatsby-transformer-rehype}"
$ babel src --out-dir . --ignore **/__tests__
Successfully compiled 2 files with Babel.
$ babel src --out-dir . --ignore **/__tests__
Successfully compiled 2 files with Babel.
$ babel src --out-dir . --ignore **/__tests__
Successfully compiled 2 files with Babel.
$ babel src --out-dir . --ignore **/__tests__
Successfully compiled 4 files with Babel.
$ babel src --out-dir . --ignore **/__tests__
Successfully compiled 10 files with Babel.
lerna success run Ran npm script 'build' in 5 packages in 1.6s:
lerna success - gatsby-plugin-ghost-images
lerna success - gatsby-rehype-ghost-links
lerna success - gatsby-rehype-inline-images
lerna success - gatsby-rehype-prismjs
lerna success - gatsby-transformer-rehype
Done in 2.56s.

Definitely something has changed, now the error is only present on the gatsby-theme-ghost-contact plugin that is not present in the lerna output.

 ERROR #85923  GRAPHQL

There was an error in your GraphQL query:

Cannot query field "featureImageSharp" on type "ContactPage".

If you don't expect "featureImageSharp" to exist on the type "ContactPage" it is most likely a typo.
However, if you expect "featureImageSharp" to exist there are a couple of solutions to common problems:

- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "featureImageSharp" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add a least one entry with that field ("dummy content")

It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "ContactPage":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: ../packages/gatsby-theme-ghost-contact/src/template/contact.js:105:9

failed extract queries from components - 0.538s
warn The GraphQL query in the non-page component "/home/enrico/gatsby-theme-try-ghost/packages/gatsby-theme-try-ghost/src/templates/page.js" will not be run.
Exported queries are only executed for Page components. It's possible you're
trying to create pages in your gatsby-node.js and that's failing for some
reason.

If the failing component(s) is a regular component and not intended to be a page
component, you generally want to use a <StaticQuery> (https://gatsbyjs.org/docs/static-query)
instead of exporting a page query.

If you're more experienced with GraphQL, you can also export GraphQL
fragments from components and compose the fragments in the Page component
query and pass data down into the child component — https://graphql.org/learn/queries/#fragments

from gatsby-theme-try-ghost.

styxlab avatar styxlab commented on August 25, 2024

This needs to be investigates further. Could you please post a bit more info about your environment (Windows version, build), which Linux image you are using, etc.?

from gatsby-theme-try-ghost.

styxlab avatar styxlab commented on August 25, 2024

There was a problem with yarn workspaces not fully able to resolve the gatsby-plugin-ghost-images. I did not find the route cause, but implemented a workaround by including the built gatsby-nodejs.js files in the repository. Can you please start over from a fresh clone and see if that fixes your problem?

from gatsby-theme-try-ghost.

styxlab avatar styxlab commented on August 25, 2024

Cannot reproduce the issue.

My test system:

  • Windows 10 Version 1903 (Build 18362.778)
  • WSL 1 with Ubuntu 20.04 LTS
  • node: v12.16.3
  • yarn: 1.22.4
  • gatsby CLI version 2.12.21

Installation:

$ git clone https://github.com/styxlab/gatsby-theme-try-ghost.git
$ cd gatsby-theme-try-ghost
$ yarn
$ yarn develop

Also tested successfully with yarn build. Please provide detailed instructions for reproduction.

from gatsby-theme-try-ghost.

enryIT avatar enryIT commented on August 25, 2024

There was a problem with yarn workspaces not fully able to resolve the gatsby-plugin-ghost-images. I did not find the route cause, but implemented a workaround by including the built gatsby-nodejs.js files in the repository. Can you please start over from a fresh clone and see if that fixes your problem?

Those 2 "test" commits resolved the issue, it is now correctly compiling without errors.

Thank you very much for your attention.

from gatsby-theme-try-ghost.

styxlab avatar styxlab commented on August 25, 2024

Sure. You are welcome.

from gatsby-theme-try-ghost.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.