hbz / lobid

Linking Open Bibliographic Data
https://lobid.org/
Eclipse Public License 2.0
15 stars 4 forks source link

Gatsby error during build #500

Closed Phu2 closed 1 year ago

Phu2 commented 1 year ago

npm run build results in an error with Graphql "Cannot query field "jsonId" on type "ProjectJson". Both with master and 497-html-validation-errors.

> gatsby-lobid-starter@0.1.0 build
> gatsby build

success open and validate gatsby-configs - 0.046s
success load plugins - 0.572s
success onPreInit - 0.027s
success delete html and css files from previous builds - 0.004s
success initialize cache - 0.009s
success copy gatsby files - 0.033s
success onPreBootstrap - 0.014s
success createSchemaCustomization - 0.004s
success Checking for changed pages - 0.002s
success source and transform nodes - 0.311s
success building schema - 0.483s
Creating member pages:  [
  'ap', 'ap', 'pc',
  'fs', 'kt', 'tb',
  'sr', 'ak', 'pt',
  'ce'
]
Creating product pages:  [
  'lobid',
  'lobid-resources',
  'lobid-organisations',
  'lobid-gnd',
  'nwbib',
  'metafacture',
  'skohub',
  'oersi'
]

 ERROR #85923  GRAPHQL

There was an error in your GraphQL query:

Cannot query field "jsonId" on type "ProjectJson".

If you don't expect "jsonId" to exist on the type "ProjectJson" it is most likely a typo.
However, if you expect "jsonId" 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 "jsonId" 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 at 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 "ProjectJson":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: gatsby-node.js:72:13

not finished createPages - 0.110s

Gatsby CLI version: 4.16.0 Gatsby version: 2.32.13 npm 7.7.6

Phu2 commented 1 year ago

After npm install gatsby@5.5.0 and nvm use 18 build runs successfully.