Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resolve StaticQuery: JSON file not being generated #34323

Closed
2 tasks done
davwheat opened this issue Dec 27, 2021 · 4 comments
Closed
2 tasks done

Cannot resolve StaticQuery: JSON file not being generated #34323

davwheat opened this issue Dec 27, 2021 · 4 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more. topic: remark/mdx Related to Markdown, remark & MDX ecosystem type: bug An issue or pull request relating to a bug in Gatsby

Comments

@davwheat
Copy link
Contributor

Preliminary Checks

Description

I have a StaticQuery inside a component, which is being imported into an MDX file.

The StaticQuery JSON data is not being generated, meaning that at runtime in dev, I get an error like this:

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

If I stop the dev server and start it again, the server never starts, instead erroring out with a ModuleNotFoundError:

image

The attached minimal reproduction shows this issue.

Reproduction Link

https://github.com/davwheat/gatsby-issue-reproduction-2

Steps to Reproduce

  1. Create an MDX file
  2. Import a component with a static query
  3. Build fails

Expected Result

Static Query would be handled correctly and build would not fail.

Actual Result

Build fails as query JSON file doesn't exist.

Environment

`wmic` is removed in latest Windows 11 builds, breaking this Gatsby command.

Config Flags

None.

@davwheat davwheat added the type: bug An issue or pull request relating to a bug in Gatsby label Dec 27, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 27, 2021
@iChenLei
Copy link
Contributor

offtopic issue

`wmic` is removed in latest Windows 11 builds, breaking this Gatsby command.

We can fix it until this PR tabrindle/envinfo#214 be merged.

@LekoArts LekoArts added topic: remark/mdx Related to Markdown, remark & MDX ecosystem and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Apr 13, 2022
@github-actions
Copy link

github-actions bot commented May 3, 2022

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label May 3, 2022
@github-actions
Copy link

Hey again!

It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community! 💪💜

@fbanke
Copy link

fbanke commented Aug 23, 2022

Did you find a solution to this?
I have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more. topic: remark/mdx Related to Markdown, remark & MDX ecosystem type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

4 participants