Open gforro opened 4 years ago
The problem is caused by a change in the gatsby's babel-plugin-remove-graphql-queries
which is shadowed in the implementation of gatsby-source-graphql-universal
.
Change in the gatsbyjs: https://github.com/gatsbyjs/gatsby/commit/752f5ff29008cd175b9a6608304b4f1da73c488c#diff-a46d7772b3756095c8e95b889d9b1df1
Pull request has been created for the fix in the gatsby-source-graphql-universal
: https://github.com/birkir/gatsby-source-graphql-universal/pull/25
Hi @gforro can you make the PR here and we'll merge it into an upstream package? https://github.com/prismicio/gatsby-source-graphql-universal
If anyone is having the same issue with staticquery, or an issue with a broken dependency in the gatsby-source-prismic-graphql, I fixed mine by switching from this branch to the @prismicio branch mentioned by @MarcMcIntosh that has more fixes applied.
For NPM newbies like me that need more specific instructions:
The easiest way I found to seamlessly switch to the prismic fork was to remove the old package, and then install the prismic version as an alias
npm i gatsby-source-prismic-graphql@npm:@prismicio/gatsby-source-prismic-graphql
Can also be done by adding this to your package.json dependencies
"gatsby-source-prismic-graphql": "npm:@prismicio/gatsby-source-prismic-graphql@^3.6.10",
The static queries stop to work, when the gatsby-source-prismic-graphql plugin is configured to be used. The problem is that the query is stucked for some reasons and the
Loading (StaticQuery)
message is shown in a page, where a component with a simple static query is used. It is enough to use thestatic-query
example from this repositories to reproduce the problem. Steps to reproduce the problem:gatsby-source-graphql-universal
- Error: Cannot find module './third-party/gatsby-node): Add to thescripts
part:Add to the root part:
Add the following to the
gatsby-node.js
to fix the issue with the cache (problem when gatsby cache is cleaned):<Layout>
part in the index.js page.Now You will get the problem!