gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.26k stars 10.31k forks source link

Site fails with Error in function useStaticQuery #31977

Closed thomasmost closed 3 years ago

thomasmost commented 3 years ago

Site doesn't load, instead an error is reported advising me to open a bug

Description

Multiple unhandled runtime errors found in your files. See the list below to fix them:

Error in function useStaticQuery in ./.cache/gatsby-browser-entry.js:77 The result of this StaticQuery could not be fetched. This is likely a bug in Gatsby and if refreshing the page does not fix it, please open an issue in https://github.com/gatsbyjs/gatsby/issues

Error( | ^ 78 | The result of this StaticQuery could not be fetched.\n\n + 79 | This is likely a bug in Gatsby and if refreshing the page does not fix it, + 80 | please open an issue in https://github.com/gatsbyjs/gatsby/issues

Error in function FeaturedLogos in ./node_modules/gatsby-theme-catalyst-hydrogen/src/components/home-page/home-logos.js:38

Error in function FeaturedWork in ./node_modules/gatsby-theme-catalyst-hydrogen/src/components/home-page/home-work.js:44

Error in function HomeContact in ./node_modules/gatsby-theme-catalyst-hydrogen/src/components/home-page/home-contact.js:21

Error in function SiteFooter in ./node_modules/gatsby-theme-catalyst-footer/src/components/footer.js:61

Steps to reproduce

Check out https://github.com/thomasmost/pscsite, run npm i --legacy-peer-deps and gatsby develop

Expected result

The page should load

Actual result

The Error message above

Environment

Run gatsby info --clipboard in your project directory and paste the output here. Also name any flags you use inside gatsby-config.js.

LekoArts commented 3 years ago

Hi!

The stacktrace is pointing to a theme you're using so please first open an issue there: https://github.com/ehowey/gatsby-theme-catalyst

If you still see problems then please post an answer to https://github.com/gatsbyjs/gatsby/issues/31817 - thanks!