question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing onError handler for invocation 'rebuildSchemaWithSitePage'

See original GitHub issue

Description

Missing onError handler for invocation 'rebuildSchemaWithSitePage', error was 'TypeError: Cannot read property 'contents' of null'. Stacktrace was 'TypeError: Cannot read property 'contents' of null
    at get (/home/simon/tmp/bug-repro/node_modules/gatsby/src/utils/get-value-at.ts:10:20)
    at map (/home/simon/tmp/bug-repro/node_modules/gatsby/src/utils/get-value-at.ts:20:59)
    at Array.map (<anonymous>)
    at getArray (/home/simon/tmp/bug-repro/node_modules/gatsby/src/utils/get-value-at.ts:19:6)
    at get (/home/simon/tmp/bug-repro/node_modules/gatsby/src/utils/get-value-at.ts:12:36)
    at get (/home/simon/tmp/bug-repro/node_modules/gatsby/src/utils/get-value-at.ts:13:50)
    at get (/home/simon/tmp/bug-repro/node_modules/gatsby/src/utils/get-value-at.ts:13:50)
    at get (/home/simon/tmp/bug-repro/node_modules/gatsby/src/utils/get-value-at.ts:13:50)
    at getValueAt (/home/simon/tmp/bug-repro/node_modules/gatsby/src/utils/get-value-at.ts:4:10)
    at getFirstValueAt (/home/simon/tmp/bug-repro/node_modules/gatsby/src/schema/infer/is-file.ts:14:15)
    at find (/home/simon/tmp/bug-repro/node_modules/gatsby/src/schema/infer/is-file.ts:84:13)
    at Array.find (<anonymous>)
    at getFilePath (/home/simon/tmp/bug-repro/node_modules/gatsby/src/schema/infer/is-file.ts:83:41)
    at isFile (/home/simon/tmp/bug-repro/node_modules/gatsby/src/schema/infer/is-file.ts:91:20)
    at getSimpleFieldConfig (/home/simon/tmp/bug-repro/node_modules/gatsby/src/schema/infer/add-inferred-fields.js:315:11)
    at getFieldConfig (/home/simon/tmp/bug-repro/node_modules/gatsby/src/schema/infer/add-inferred-fields.js:174:19)'

Steps to reproduce

Minimal reproduction: https://github.com/SimonSiefke/gatsby-bug

  1. Run gatsby develop
  2. Error occurs

Expected result

No Error

Actual result

Error

Environment


  System:
    OS: Linux 5.4 Ubuntu 20.04.1 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 14.3.0 - ~/.nvm/versions/node/v14.3.0/bin/node
    Yarn: 1.22.4 - ~/.nvm/versions/node/v14.3.0/bin/yarn
    npm: 6.14.5 - ~/.nvm/versions/node/v14.3.0/bin/npm
  Browsers:
    Chrome: 84.0.4147.125
    Firefox: 79.0
  npmPackages:
    gatsby: ^2.24.47 => 2.24.47 
  npmGlobalPackages:
    gatsby-cli: 2.12.87

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:15
  • Comments:47 (5 by maintainers)

github_iconTop GitHub Comments

46reactions
div-cowboycommented, Mar 3, 2021

This is also happening in Gatsby V3

17reactions
Faiiyacommented, Mar 3, 2021

Im also having this error in Gatsby V3 , tried gatsby clean and deleting node_modules an reinstalling but the error persist

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix Invariant Violation errors when running Gatsby build ...
Missing onError handler for invocation 'building-schema', error was Invariant Violation: Encountered an error trying to infer a GraphQL type ...
Read more >
Missing onError handler for invocation 'building-schema' #1624
I have an existing Gatsby V3 project with MDX pages I wanted to use gatsby-theme-docz with for our documentation. After following the setup...
Read more >
Issues Updating to Gatsby 4.9.2 : r/gatsbyjs - Reddit
as well as - "Missing onError handler for invocation 'building-schema', error was 'Error: Cannot create as TypeComposer the following ...
Read more >
Troubleshooting Common Errors - Gatsby
Error: ReferenceError: window is not defined when running gatsby build · Build problems from Field 'browser' doesn't contain a valid alias configuration ·...
Read more >
Migrate to V4 - Need help - Errors - Developing with Prismic
I am getting errors when running gatsby develop after migrating to V4. The error I get is: Missing onError handler for invocation 'building- ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found