-
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
Cannot query field \"allMarkdownRemark\" on type \"RootQueryType\ #3150
Comments
Possibly related to #2212 |
I'm getting the same error:
the thing is I have two gatsby sites. they are forks of the same root project. One works fine and builds without a problem. the other throws that error. they are structured similarly. I even cp'd the node_modules folder directly from working to non working project, in case it was a version problem. |
Does the site with the error have any markdown files? |
The error @jonathan-chin is seeing is probably #3103 in conjunction with #2212. If the @thebetterjort's repo includes markdown files, it may also be consequent to #3103. |
The repo does include markdown files. #3103 seems related. It's working after I recreated the config. |
@thebetterjort Is this now working for you with the latest version of Gatsby? |
I'm still getting this error!
|
@droidMakk Can you share repository so we could reproduce the problem? There is not enough context in stuff you posted to figure out what's wrong |
@pieh |
Hey @droidMakk 👋 Using Node v9.6.1 I did a fresh clone of your repository, checked out the master branch, ran More information on your environment and the commands you're running could be useful, but you might also try doing a fresh clone of the project like I did to see if that sorts things out |
Hey @flipactual @pieh . Thanks for the help been migrating my work folders from one user to the other to test if the path was the problem. Turns out actually that was the problem. Thanks again for the help guys! |
Glad to hear it's working @droidMakk! Per this conversation and #3150 (comment) I'm going to close the issue, but feel free to reopen or a create a new issue if the problem pops back up again |
Using plugin gatsby-source-filesystem add also path to your folder with .md files. |
My code had been working, but a recent upgrade to around 2.18 seems to have broken the |
query
{ allMarkdownRemark { edges { node { title } } }
package.json
{ "name": "gatsby-starter-hello-world", "description": "Gatsby hello world starter", "license": "MIT", "scripts": { "develop": "gatsby develop", "build": "gatsby build", "serve": "gatsby serve" }, "dependencies": { "gatsby": "^1.9.119", "gatsby-link": "^1.6.28", "gatsby-plugin-styled-components": "^2.0.3", "gatsby-plugin-typography": "^1.7.10", "gatsby-remark-copy-linked-files": "^1.5.22", "gatsby-source-filesystem": "^1.5.9", "gatsby-transformer-json": "^1.0.13", "gatsby-transformer-remark": "^1.7.23", "styled-components": "^2.2.4", "typography": "^0.16.6", "typography-theme-bootstrap": "^0.16.7", "typography-theme-lawton": "^0.15.10", "typography-theme-us-web-design-standards": "^0.16.9" } }
http://localhost:8000/___graphql?query=%7B%0A%20%20allMarkdownRemark%20%7B%0A%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20node%20%7B%0A%09%09%09title%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D
I also cannot query JSON file or markdown files as I expect.
I have json file in /data/a.json with { 'value': 'a' }
I have rm -rf node_modules/ and reinstalled.
I have used two browsers just in case of cache issue.
gatsby-config.js
`
module.exports = {
}
`
The text was updated successfully, but these errors were encountered: