You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating my own plugin, where I call useStaticQuery to grab siteMetadata.
The plugin loads fine, but fails to execute the query and shows this error.
My colleague said that he unblocked you via Twitter DM. For people from the future finding this via Google: This issue is a duplicate of #7747 (comment) and the gist is that Gatsby only compiles the queries for files inside src so the author of this issue moved his file with the query inside that directory.
We're marking this issue as answered and closing it for now but please feel free to comment here if you would like to continue this discussion. We also recommend heading over to our communities if you have questions that are not bug reports or feature requests. We hope we managed to help and thank you for using Gatsby!
Description
I'm creating my own plugin, where I call
useStaticQuery
to grabsiteMetadata
.The plugin loads fine, but fails to execute the query and shows this error.
Steps to reproduce
Here is a minimal reproduction.
index.js
file.useStaticQuery
from within the React component.gatsby-config.js
.index.js
.index.js
.Expected result
I expect a
data
object to be returned that looks like this.Actual result
The site crashes upon running the static query, citing this error.
Environment
I can reproduce this with a local plugin, or one installed with
npm link
.This is reproducible both on my local windows machine and on CodeSandbox.
System:
OS: Windows 10 10.0.18363
CPU: (8) x64 Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Binaries:
Node: 12.13.1 - D:\nodejs\node.EXE
Yarn: 1.22.4 - ~\AppData\Roaming\npm\yarn.CMD
npm: 6.14.5 - D:\nodejs\npm.CMD
Languages:
Python: 2.7.17 - /c/Python27/python
Browsers:
Edge: 44.18362.449.0
npmPackages:
gatsby: ^2.22.9 => 2.22.9
npmGlobalPackages:
gatsby-cli: 2.12.34
gatsby-plugin-seo: 0.0.1
I would love to join a Community Pair Programming session to work through this issue!
The text was updated successfully, but these errors were encountered: