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

Failed to compile: Multiple "root" queries found #29690

Closed
jjoshkan opened this issue Feb 22, 2021 · 2 comments
Closed

Failed to compile: Multiple "root" queries found #29690

jjoshkan opened this issue Feb 22, 2021 · 2 comments
Labels
status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. type: bug An issue or pull request relating to a bug in Gatsby

Comments

@jjoshkan
Copy link

Description

I followed the steps to develop gatsby using this template (Gatsby Starter Elemental). At first, everything works fine and I just have to make some changes to some files. But then after I tried to open the project again, this error occurred. I actually fixed this problem twice using this thread #24902 but for some reason, the problem kept coming back until the solution does not work again.

I found thread #22795 quite similar to my case, but the solution is just renaming the directory when developing the environment and I don't think I have the same problems as this thread.

Steps to reproduce

My GitHub project repo: https://github.com/jjoshkan/portfolio_el
I tried running the gatsby develop command into my Windows PowerShell and got this error message

image

Expected result

It should output the same as the above screenshot

Actual result

There should not be multiple root queries in either about.tsx and index.tsx (sometimes it's not just index.tsx, the error also tells me that multiple queries in about.tsx detected).

Environment

System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Binaries:
Node: 15.5.1 - C:\Program Files\nodejs\node.EXE
npm: 7.3.0 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 3.7.2
Browsers:
Chrome: 88.0.4324.182
Edge: Spartan (44.19041.423.0), Chromium (88.0.705.74)
npmPackages:
gatsby: 2.23.3 => 2.23.3
gatsby-image: ^2.3.1 => 2.9.0
gatsby-plugin-codegen: ^1.1.0 => 1.2.14
gatsby-plugin-disqus: ^1.1.4 => 1.2.2
gatsby-plugin-mdx: ^1.1.3 => 1.8.0
gatsby-plugin-postcss: ^2.2.1 => 2.3.13
gatsby-plugin-react-helmet: ^3.2.1 => 3.8.0
gatsby-plugin-sharp: ^2.5.3 => 2.12.0
gatsby-plugin-typescript: ^2.4.0 => 2.10.0
gatsby-remark-images: ^3.2.1 => 3.9.0
gatsby-source-filesystem: ^2.2.2 => 2.9.0
gatsby-transformer-sharp: ^2.4.3 => 2.10.0
npmGlobalPackages:
gatsby-cli: 2.19.1

@jjoshkan jjoshkan added the type: bug An issue or pull request relating to a bug in Gatsby label Feb 22, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 22, 2021
@LekoArts LekoArts added status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Feb 23, 2021
@LekoArts
Copy link
Contributor

Hi!

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.

Thanks for using Gatsby! 💜

@LekoArts
Copy link
Contributor

LekoArts commented Mar 4, 2021

Hi!

Since we didn't receive an answer for 7 days or more about the ask of a reproduction I'm going to close this now, as we can't do much to help without a reproduction. If you are able to create a minimal reproduction for this then please do answer here or open a new issue with a reproduction. Thanks!

@LekoArts LekoArts closed this as completed Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

2 participants