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

yarn build fails with several errors #36

Open
campegg opened this issue Aug 24, 2022 · 0 comments
Open

yarn build fails with several errors #36

campegg opened this issue Aug 24, 2022 · 0 comments

Comments

@campegg
Copy link

campegg commented Aug 24, 2022

I'm trying to build using yarn build and it keeps failing with multiple "An error occurred during parallel query running" errors. Initial setup was done following the instructions from the README and using the example content.

I have reproduced this issue on three different machines: MacBook Pro (2019, Intel) and MacBook Air (2020, M1), both running macOS 12.5.1 with node v18.7.0, npm v8.15. and yarn v1.22.19 and a Raspberry Pi 3B+ running bullseye and the same versions of node, npm and yarn.

Here is the output from running yarn build (long, sorry!):

% yarn build
yarn run v1.22.19
$ gatsby build
success compile gatsby files - 0.397s
success load gatsby config - 0.011s
warn Plugin gatsby-transformer-remark is not compatible with your gatsby version 4.21.1 - It requires gatsby@^2.12.0
warn Plugin @aengusm/gatsby-theme-brain is not compatible with your gatsby version 4.21.1 - It requires gatsby@^2.20.23
warn Plugin gatsby-plugin-theme-ui is not compatible with your gatsby version 4.21.1 - It requires gatsby@^2.13.1
warn Plugin gatsby-theme-andy is not compatible with your gatsby version 4.21.1 - It requires gatsby@^2.20.23
warn Plugin gatsby-transformer-remark is not compatible with your gatsby version 4.21.1 - It requires gatsby@^2.12.0
warn Plugin @aengusm/gatsby-theme-brain is not compatible with your gatsby version 4.21.1 - It requires gatsby@^2.20.23
warn Plugin gatsby-plugin-theme-ui is not compatible with your gatsby version 4.21.1 - It requires gatsby@^2.13.1
warn Plugin gatsby-theme-andy is not compatible with your gatsby version 4.21.1 - It requires gatsby@^2.20.23
success load plugins - 0.505s
success onPreInit - 0.001s
success initialize cache - 0.107s
success copy gatsby files - 0.120s
success Compiling Gatsby Functions - 0.192s
success onPreBootstrap - 0.204s
success createSchemaCustomization - 0.006s
warn Calling `createTypes` in the `sourceNodes` API is deprecated. Please use: `createSchemaCustomization`.
warn Calling `createTypes` in the `sourceNodes` API is deprecated. Please use: `createSchemaCustomization`.
success Checking for changed pages - 0.001s
success source and transform nodes - 0.359s
info Writing GraphQL type definitions to /Users/camp/Public/garden/.cache/schema.gql
success building schema - 0.280s
success createPages - 0.039s
success createPagesStatefully - 0.030s
info Total nodes: 47, SitePage nodes: 5 (use --verbose for breakdown)
success Checking for changed pages - 0.001s
success onPreExtractQueries - 0.001s
success extract queries from components - 0.730s
warn The GraphQL query in the non-page component "/Users/camp/Public/garden/node_modules/@aengusm/gatsby-theme-brain/src/templates/brain.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.com/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
success write out redirect data - 0.006s
success onPostBootstrap - 0.001s
info bootstrap finished - 4.852s
success write out requires - 0.028s
success Building production JavaScript and CSS bundles - 8.336s
success Building HTML renderer - 8.878s
success Execute page configs - 0.047s
success Caching Webpack compilations - 0.001s

 ERROR #85925  GRAPHQL

There was an error in your GraphQL query:

Cannot return null for non-nullable field Mdx.body.

The field "Mdx.body." was explicitly defined as non-nullable via the schema customization API (by yourself or a plugin/theme). This means that this
field is not optional and you have to define a value. If this is not your desired behavior and you defined the schema yourself, go to "createTypes" in
 gatsby-node.js. If you're using a plugin/theme, you can learn more here on how to fix field types:
https://www.gatsbyjs.com/docs/reference/graphql-data-layer/schema-customization#fixing-field-types

   1 | query BrainNoteWithRefsBySlug($slug: String!) {
   2 |   brainNote(slug: {eq: $slug}) {
   3 |     slug
   4 |     title
   5 |     childMdx {
>  6 |       body
     |       ^
   7 |     }
   8 |     inboundReferenceNotes {
   9 |       title
  10 |       slug
  11 |       childMdx {
  12 |         excerpt
  13 |       }
  14 |     }
  15 |     outboundReferenceNotes {
  16 |       title

File path: /Users/camp/Public/garden/node_modules/gatsby-theme-andy/src/templates/note.js
Url path: /
Plugin: none


 ERROR #85925  GRAPHQL

There was an error in your GraphQL query:

Cannot return null for non-nullable field Mdx.excerpt.

The field "Mdx.excerpt." was explicitly defined as non-nullable via the schema customization API (by yourself or a plugin/theme). This means that this
 field is not optional and you have to define a value. If this is not your desired behavior and you defined the schema yourself, go to "createTypes"
in gatsby-node.js. If you're using a plugin/theme, you can learn more here on how to fix field types:
https://www.gatsbyjs.com/docs/reference/graphql-data-layer/schema-customization#fixing-field-types

   9 |       title
  10 |       slug
  11 |       childMdx {
  12 |         excerpt
  13 |       }
  14 |     }
  15 |     outboundReferenceNotes {
  16 |       title
  17 |       slug
  18 |       childMdx {
> 19 |         excerpt
     |         ^
  20 |       }
  21 |     }
  22 |   }
  23 |   site {
  24 |     siteMetadata {
  25 |       title
  26 |     }
  27 |   }
  28 | }
  29 |

File path: /Users/camp/Public/garden/node_modules/gatsby-theme-andy/src/templates/note.js
Url path: /
Plugin: none


 ERROR #85925  GRAPHQL

There was an error in your GraphQL query:

Cannot return null for non-nullable field Mdx.excerpt.

The field "Mdx.excerpt." was explicitly defined as non-nullable via the schema customization API (by yourself or a plugin/theme). This means that this
 field is not optional and you have to define a value. If this is not your desired behavior and you defined the schema yourself, go to "createTypes"
in gatsby-node.js. If you're using a plugin/theme, you can learn more here on how to fix field types:
https://www.gatsbyjs.com/docs/reference/graphql-data-layer/schema-customization#fixing-field-types

   9 |       title
  10 |       slug
  11 |       childMdx {
  12 |         excerpt
  13 |       }
  14 |     }
  15 |     outboundReferenceNotes {
  16 |       title
  17 |       slug
  18 |       childMdx {
> 19 |         excerpt
     |         ^
  20 |       }
  21 |     }
  22 |   }
  23 |   site {
  24 |     siteMetadata {
  25 |       title
  26 |     }
  27 |   }
  28 | }
  29 |

File path: /Users/camp/Public/garden/node_modules/gatsby-theme-andy/src/templates/note.js
Url path: /
Plugin: none


 ERROR #85928 

An error occurred during parallel query running.
Go here for troubleshooting tips: https://gatsby.dev/pqr-feedback



  Error: Worker exited before finishing task
  
  - index.js:117 ChildProcess.<anonymous>
    [garden]/[gatsby-worker]/dist/index.js:117:45
  
  - node:events:513 ChildProcess.emit
    node:events:513:28
  
  - child_process:291 Process.ChildProcess._handle.onexit
    node:internal/child_process:291:12
  

not finished run queries in workers - 0.118s

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

And this is what my package.lock file looks like:

{
  "name": "notes-test",
  "version": "1.0.0",
  "description": "Testing gatsby-theme-andy",
  "main": "index.js",
  "scripts": {
    "build": "gatsby build",
    "develop": "gatsby develop",
    "clean": "gatsby clean"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "gatsby": "^4.21.1",
    "gatsby-theme-andy": "^0.2.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  }
}

yarn develop works, but throws the same plugin "is not compatible with your gatsby version" warnings shown early when running yarn build.

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

No branches or pull requests

1 participant