gatsby: ERROR #85901 GRAPHQL
Description
Updated to the latest version of gatsby 2.13.1 and started getting the following error after running gatsby develop.
ERROR #85901 GRAPHQL
There was an error in your GraphQL query:
Error: RelayParser: Encountered duplicate defintitions for one or more documents: each document must have a unique name. Duplicated documents:
- SiteTitleQuery
I was able to fix this issue after removing gatsby-plugin-mailchimp
Apparently the mailchimp examples are creating a problem.
Just wanted to let everyone else know.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 11
- Comments: 39 (17 by maintainers)
@darrencarlin Not ideal, but this probably happens if you have 0 assets/images - as a workaround you might try adding dummy image there (that you don’t have to use)
Hello again, sorry for the duplicate post, but I found a solution to the #85901 GRAPHQL error. Maybe this is helpful for others.
gatsby-transformer-sharp
to2.2.1
.sharp
from thenode_modules
directory and re-installed it.npm list sharp
, updated the packages that were listed, includinggatsby-plugin-sharp
andgatsby-transformer-sharp
, and nowgatsby build
is successful and all deployments on Netlify are working as before.Now everything is working fine again. 😆 Thanks again guys. Hope this helps you
Thanks @kerminz Changing to those exact versions, without the caret in the version number, worked for me:
"gatsby-source-contentful": "2.0.41", and "gatsby": "2.9.10"
rather than"gatsby-source-contentful": "^2.0.41", and "gatsby": "^2.9.10",
I tried using the versions with the caret but that didn’t help.
That will do for a temporary fix to get my site back updating until I work out a proper fix.
I am getting the same error when deploying my gatsby site on Netlify, none of the usual steps (npm install, deleting suspicious packages, clearing cache, …) fixed this…
12:48:51 PM: error #85901 GRAPHQL 12:48:51 PM: There was an error in your GraphQL query: 12:48:51 PM: Unknown type "ImageSharpFixed".
Getting the same error, too. However, I don’t have gatsby-plugin-mailchimp in my website
@pieh Amazing.
If anyone was wondering what they meant by “adding dummy image there”, follow these steps:
I have so many questions, but already wasted enough time on this to try to understand why that matters.
I can also confirm this is still an issue in version 2.13.x Downgrading Gatsby to strict version 2.9.10 seemed to temporarily fix the issue.
gatsby-plugin-algolia@0.3.1
is out with the fix! Thanks to @Haroenv ❤️Spent an embarassing amount of time with this issue, when all it took to resolve was:
npm install gatsby-plugin-mailchimp@5.1.2
i ran
npm outdated
to see thatgatsby-plugin-mailchimp
was red and needed to be updated.Thanks for this answer. I’m currently trying to do this, but when I attempt any image upload, getting “An error occurred while uploading your asset.”, no matter what image I upload. Hopefully contentful will resolve that very soon. ( might be a corporate firewall though, too,… so I’m going to try connecting to their guest wifi here ). Edit: dang, that was it. ( shouldn’t be working on their time anyway )
It happens when you use contentful as your CMS, as it forcefully creates image asset in the node modules folder. one needs to add a dummy image to the Media section in the contentful web application, further, if there are image manipulation plugins like gatsby-transformer-remark, gatsby-plugin-sharp or similar, you need to take care of that, as gatsby throws an exception by default in the most newer versions !!
I’m having this issue on Gatsby@2.13+ also, same as @andrewlsimplisafe I went back to Gatsby@2.12 and all ok, for now.
T.Hanks
System: OS: Linux 5.0 Ubuntu 19.04 (Disco Dingo) CPU: (4) x64 Intel® Core™ i7-7500U CPU @ 2.70GHz Shell: 5.0.3 - /bin/bash Binaries: Node: 10.10.0 - /tmp/yarn–1563253924944-0.6676510842109993/node Yarn: 1.16.0 - /tmp/yarn–1563253924944-0.6676510842109993/yarn npm: 6.4.1 - ~/n/bin/npm Languages: Python: 2.7.16 - /usr/bin/python Browsers: Firefox: 68.0 npmPackages: gatsby: 2.12.0 => 2.12.0 gatsby-plugin-catch-links: ^2.0.9 => 2.1.2 gatsby-plugin-favicon: ^3.1.6 => 3.1.6 gatsby-plugin-google-analytics: 2.1.4 => 2.1.4 gatsby-plugin-manifest: 2.2.3 => 2.2.3 gatsby-plugin-netlify: ^2.0.6 => 2.1.3 gatsby-plugin-netlify-cms: 4.1.6 => 4.1.6 gatsby-plugin-offline: 2.2.4 => 2.2.4 gatsby-plugin-react-helmet: 3.1.2 => 3.1.2 gatsby-plugin-remove-serviceworker: ^1.0.0 => 1.0.0 gatsby-plugin-robots-txt: 1.5.0 => 1.5.0 gatsby-plugin-sharp: 2.2.7 => 2.2.7 gatsby-plugin-sitemap: 2.2.3 => 2.2.3 gatsby-plugin-styled-components: 3.1.2 => 3.1.2 gatsby-remark-autolink-headers: 2.1.3 => 2.1.3 gatsby-remark-external-links: 0.0.4 => 0.0.4 gatsby-remark-smartypants: ^2.0.9 => 2.1.2 gatsby-source-filesystem: 2.1.5 => 2.1.5 gatsby-source-graphql: 2.1.2 => 2.1.2 gatsby-transformer-remark: 2.6.6 => 2.6.6 gatsby-transformer-sharp: 2.2.3 => 2.2.3
@andrewlsimplisafe I can use up to Gatsby
2.11.7
and avoid this error.Also, I use none of the plugins mentioned above:
gatsby info
@spookyMilly This should be fixed by updating
gatsby-transformer-sharp
to2.2.1
This is occurring because some packages happen to ship example code (that includes queries). And we now parse
node_modules
to support queries in dependencies and themes since https://github.com/gatsbyjs/gatsby/pull/15284The correct fix for this is for packages to add examples to
.npmignore
I’m fixing
gatsby-plugin-mailchimp
andgatsby-plugin-algolia
right now and writing a script to find more plugins in the wild that need to the resolved.In the mean time, @javidhsueh @bogdancss @spookyMilly can you please post your
gatsby info
results so we can find the packages that are causing this for you and fix!Edit: Fixes for
gatsby-plugin-mailchimp
andgatsby-plugin-algolia
are open in https://github.com/benjaminhoffman/gatsby-plugin-mailchimp/pull/40 and https://github.com/algolia/gatsby-plugin-algolia/pull/31