It seems like the Changelog.md is quite outdates (it lists 1.5.0 as the latest version, while 1.9.70 is actually the current one).
It's very useful to keep the changelog up to date as it allows people to easily check which features are supported in which versions as well as have a sense of what may break between one version or the other (I understand that you are using semver, but still some things can slip).
The motivation for this is that I was trying to figure out whether or not the createRedirects function was exposed and then noticed that it's probably not part of the older gatsby I was using.
Yeah, I need to take some time to get https://github.com/gatsbyjs/gatsby/pull/2198 in and running — that way we'll have an automated changelog created. Doing it manually was taking a ton of time.
Feel free to update the CHANGELOG yourself for older work. Perhaps even just pick out the more interesting PRs.
I recently updated from Gatsby 1.1.25 to 1.9.142 and my GraphQL queries, which were previously working, started to fail with the error GraphQL Error Argument "sort" has invalid value {fields: [frontmatter___date], order: DESC}.
In field "fields": In element #0: Expected type "MarkdownRemarkConnectionSortByFieldsEnum", found frontmatter___date..
Semantic versioning shouldn't break backward compatibility with new features. I'm currently debugging and a changelog would be awesome, as I could see when the change was made. I will start to manually go through the PRs.
Gatsby is still amazing and I appreciate all the hard work but just wanted to note this as a pain point.
@ataylorme yes, a changelog would be great to get going again :-(
On this particular issue, it seems you've run into the infamous duplicate graphql instances problem. Try deleting node_modules and any lock file you have and running install again.
Thanks @KyleAMathews, nuking node_modules and package-lock.json did the trick.
Hey @KyleAMathews - I've just come across this issue as well and deleting my node_modules and lock file has not worked, unfortunately. Can you advise? It would appear that the issue is with relay-compiler having a different graphql version than gatsby as noted in #2225.
Great work on Gatsby btw 😄
@CarlMungazi try upgrading to the latest gatsby.
@KyleAMathews Installed 1.9.221 and cleared out by node-modules for a fresh npm install but still the same result. I am working off this template. My current dependencies look like:
"dependencies": {
"bulma": "^0.6.2",
"gatsby": "^1.9.221",
"gatsby-link": "^1.6.37",
"gatsby-plugin-netlify-cms": "^1.0.2",
"gatsby-plugin-react-helmet": "^1.0.5",
"gatsby-plugin-sass": "^1.0.17",
"gatsby-plugin-sharp": "^1.6.32",
"gatsby-remark-images": "^1.5.48",
"gatsby-source-filesystem": "^1.5.21",
"gatsby-transformer-remark": "^1.7.33",
"gatsby-transformer-sharp": "^1.6.20",
"prop-types": "^15.6.0",
"react": "^16.2.0",
"react-helmet": "^5.2.0",
"react-load-script": "0.0.6"
},
Remove react — that might help. Gatsby v1 only supports React 15 unless you add gatsby-plugin-react-next.
Try searching your node_modules for graphql e.g. find node_modules -name graphql
Still no luck hmm. I've only found one graphql module (node_modules/graphql). Can't think for the life of me what the issue could be.
@CarlMungazi I had the same issue and wrapping the fields value in brackets worked for me: sort: {fields: [frontmatter___order], order: ASC}
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help!
I got this error when I only had one sub-folder in my pages/ folder. Fixed it by adding another sub-folder, so that there was more than one sub-folder. Maybe it's related to the array fix @KendallWhitman found - something to do with Gatsby interpreting entries as an array vs. single object.
Most helpful comment
@CarlMungazi I had the same issue and wrapping the fields value in brackets worked for me:
sort: {fields: [frontmatter___order], order: ASC}