-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Gatsby states dynamic page component is non-page component #7379
Comments
can you send in a reproduction repo showing the error? |
I debugged a little more and found out that the problem is the child image sharp request in the
|
Today, I had the same effect. The reason was: I accessed a field in the frontmatter that I did not mention in the GraphQL query. After I added it to the query, everything worked fine without the "non-page component" message. To debug this, I invoked gatsby using this statement:
|
Hi @jordyvanraaij, as @Chuloo suggested can you provide a reproduction repo showing the error? |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub issues, we have to clean some of the old issues as many of them have already been resolved with the latest updates. Please make sure to update to the latest Gatsby version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 |
This issue is being closed because there hasn't been any activity for at least 30 days. Feel free to open a new one if you still experience this problem 👍 |
@danielberndt This warning happens because It seems when you use @ChristopherBiscardi I guess this is known issue with |
@pieh yes, that is what happens (we create a wrapper that imports the user's page component). @danielberndt's issue looks separate from the original filing here. The warning is accurate (what it says is happening is actually happening) but irrelevant to MDX users (because we hoist the pageQuery and run it in a higher level wrapper). It is a warning that causes people some confusion since it doesn't apply to MDX, but I'm not sure how we'd appropriately figure this out inside gatsby to silence the warning. On the MDX side, I'm hoping we won't need these wrappers and want to investigate better approaches like returning an MDX component from the graphql query itself, rather than wrapping entire pages, etc. This would get rid of the warning from our end. A much less palatable approach is writing a webpack loader that targets page files and removes the pageQuery for mdx wrapped page templates when loading. |
Got this same issue, any fix or workaround yet? @danielberndt were you able to find a fix? also, in my case, the pageQuery didn't run at all. |
@Chuloo ran into a gatsby-mdx bug. Since the docs changed to use |
Ran into this problem too. |
This btw is completely fixed in gatsby-mdx in the 0.3 line (current stable version 0.3.3), so shouldn't appear anymore related to that library |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 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. You can also add the label "not stale" to keep this issue open! Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 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 Thanks again for being part of the Gatsby community! |
Hey again! It’s been 30 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 Thanks again for being part of the Gatsby community! |
Hello, I am experiencing the same issue. Anyone may help? |
Description
During build Gatsby logs a warning that my dynamic page component is a non-page component, however it's not.
Steps to reproduce
Running either
gatsby develop
(will proceed) orgatsby build
(fails build)This is the start of the query in
src/templates/case.js
:I have exactly the same setup for
src/templates/blog.js
and no errors whatsoever, which makes it extra weird.Expected result
It should process it as an actual page component
Actual result
It doesn't recognise the file as being a page component. In development mode these pages will be blank until you just save the template being used. After a browser reload all the pages will work as expected.
Environment
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.7.0 - /usr/local/bin/node
Yarn: yarn install v0.24.6
[1/4] Resolving packages...
success Already up-to-date.
Done in 1.86s. - ~/.node/bin/yarn
npm: 6.1.0 - /usr/local/bin/npm
Browsers:
Chrome: 68.0.3440.106
Firefox: 61.0.1
Safari: 11.1.2
npmPackages:
gatsby: next => 2.0.0-beta.106
gatsby-image: next => 2.0.0-beta.8
gatsby-link: next => 2.0.0-beta.22
gatsby-plugin-mailchimp: ^2.2.3 => 2.2.3
gatsby-plugin-react-helmet: next => 3.0.0-beta.4
gatsby-plugin-sharp: next => 2.0.0-beta.8
gatsby-plugin-styled-components: next => 3.0.0-beta.3
gatsby-source-prismic: ^1.0.2 => 1.0.2
gatsby-transformer-remark: next => 2.1.1-beta.6
gatsby-transformer-sharp: next => 2.1.1-beta.7
npmGlobalPackages:
gatsby-cli: 1.1.58
File contents (if changed)
gatsby-node.js
:The text was updated successfully, but these errors were encountered: