Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: The result of this StaticQuery could not be fetched - Gatsby

Tags:

reactjs

gatsby

That is quite strange... I was working on a completely different part of the project and out of nowhere, I've started to get this error from different files. I have tested my query on query panel (path /___graphql); working like a charm. I have started to comment out component that giving error, then similar error happened another file.

One of the failed staticQuery that has been working for a long time is :

const Data = useStaticQuery(graphql`
    query {
      saasClassicJson {
        FOOTER_WIDGET {
          title
          menuItems {
            text
            url
          }
        }
      }
    }
  `);

  return ...
};

I am using :

  • Gatsby CLI 2.12.48
  • Gatsby 2.20.29
like image 573
Kerem atam Avatar asked Sep 02 '25 10:09

Kerem atam


1 Answers

It appears that problem was about .cache folder having corrupted build data.

Removing .cache and re-running project solved the problem.

like image 186
Kerem atam Avatar answered Sep 04 '25 04:09

Kerem atam