-
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
After npm update, suddenly getting GRAPHQL ERROR - "featuredimage" must not have a selection since type "String" has no subfields #19748
Comments
I am also getting this same issue. EDIT - I have tested the build with package versions back from 2.18.2 and it starts working again at 2.17.17. Version 2.17.17 throws the following error with this version during build (gatsby develop): Unexpected key "inferenceMetadata" found in preloadedState argument passed to createStore. Expected to find one of the known reducer keys instead: "program", "nodes", "nodesByType", "resolvedNodesCache", "nodesTouched", "lastAction", "flattenedPlugins", "config", "pages", "schema", "status", "componentDataDependencies", "components", "staticQueryComponents", "jobs", "webpack", "webpackCompilationHash", "redirects", "babelrc", "schemaCustomization", "themes", "logs". Unexpected keys will be ignored. Site still works though. Version 2.17.16 - site works and no error thrown during build (gatsby develop). So It looks as if the problem, was introduced in version 2.18.0 |
I'm getting the exact same error, but even downgrading to 2.17.16 isn't solving the problem. Build was working fine last week. I've made zero changes to my site's code since, but suddenly it won't build after running UPDATE: I can confirm that downgrading to v2.17.16 is working for me now. I had to delete yarn.lock and also pin v2.17.16. Run |
Thanks @Atchett, @chocobuckle. Confirming that downgrading to gatsby v2.17.16 works as a temporary fix. |
Do you have a repo where I could reproduce this problem? Also, given the output of your query, your |
Have you tried this advice from the |
I am brand new to gatsby and seeing this problem on my repo. What I did:
The build now fails with: I haven't had time to change anything from the template as I updated to try to get rid of the audit warning for: Any pointers to what in the template setup is not compatible with the update would be appreciated. |
Hi @dan-mba, Looks like you are using "gatsby": "^2.18.3", which appeared to contain somethign causing this issue. I did an "npm install --save gatsby@2.17.16" and the site builds without errors for me. I was seeing the same issue BTW. |
Hi @vladar, I saw this and tried it out but unfortunately it didn't make any difference for me. The only thing that worked was installing a previous version of Gatsby (as mentioned above). It does seem as if the problem starts happening from version 2.18.0. |
The 2.18.0 release revealed problems in some plugins that directly mutate node data after a node has been created. Which is not supported or recommended by Gatsby. So the best route to fix this is to identify plugins that mutate nodes aside from gatsby APIs and adding a fix to those plugins. To proceed with this we need a Minimal Reproduction repo. If someone could provide it - that would help to solve the underlying issue. I suspect that |
After an upgrade from 2.7.15 to 2.8.4, I'm confirming the same problem and I'm using
@KyleAMathews It seems to me that the gatsby plugin ecosystem will be hard to maintain… |
Also I have updated another gatsby project that isn't using the plugin |
Also seeing this error after updating to gatsby 2.18.4. Confirm that rolling back to gatsby
Edit: Actually 2.17.17 is the most recent working version. |
@laradevitt Seeing you're using |
[deleted] Oops, never mind, totally missed vladar's comment. |
Hi @vladar, sorry for the delay but I've put together a basic setup which can be used to replicate the issue - https://github.com/Atchett/Gatsby-Issue-Test. Hope this is of some use. Thanks |
Same problem here. I use gatsby-remark-relative-images too. |
@Atchett - Edit: I didn't see that you had provided instructions in the README, sorry! FWIW I've definitely confirmed the error occurs as described. This is a pretty minimal repo so should hopefully help track down the problem. My project doesn't use |
Can confirm i use |
@laradevitt No problem, and thanks for testing and following up. Interesting that your project doesn't use gatsby-remark-relative-images. Did you see the issue @vladar mentioned above - #19781 are you using any of these? |
I ran an npm update to pick up gatsby 2.18.5 and now get the following build error for several files: ERROR #85910 GRAPHQL Multiple "root" queries found in file: "IndexPageTemplate" and "IndexPageTemplate". Instead of: Do: File: src\templates\index-page.js my current dependencies are: Is this related to the changes made in #19781 ? |
@freiksenet I could create an issue, but I have no clue how to reproduce it. This is my first project using gatsby and all I have done is clone a starter repo & update (which caused build failure). |
@Atchett - Thanks for pointing to that. I didn't look at initially because it was about a performance regression. It was merged into Hi @dan-mba - If that's the case you could just link to the starter (if it's publicly available). But first try updating to gatsby 2.18.5. |
@laradevitt I updated to 2.18.5 & got a new build error mentioned in this post. The starter repo I used is here. |
By the way: 2.18.5 kills gatsby-source-instagram plugin |
@laradevitt Thanks for the update. This does indeed fix the issue on my test site and my other site in which I initially spotted the issue. I'll take a look at the latest update for info on what was changed. Thanks to all. |
@laradevitt I opened #19863 for the new problem I am seeing |
Probably: #19876 |
|
gatsby@2.24.91 - still occurs |
|
What worked for me was to delete and re-generate |
I had this error when I updated all my versions via I then deleted |
Everyone should try this first. It worked for me. |
This worked for me. |
This worked for me too. |
Description
Running
gatsby develop
yields the following errors:Terminal:
Browser:
Perviously my gatsby site was working fine (v2.13.57), then after running
npm update
this issue started happening.Pre-Update Dependencies (package.json)
Post-Update Dependencies (package.json)
Troubleshooting
Running the following query in
http://localhost:8000/___graphql
shows that the images exist.Query:
Output:
Running a query using
childImageSharp
results in the same error seen in the build.Query:
ERROR:
Steps to reproduce
gatsby develop
Expected result
Build should succeed.
Actual result
Terminal Output:
Environment
I have read through all the similar issues related to this error message to no avail. Any help troubleshooting this would be greatly appreciated.
The text was updated successfully, but these errors were encountered: