Netlify deploy: Error #85907 GRAPHQL

Hi there!

I am currently builiding my portfolio using Gatsby and Netlify deployment. However I have an issue when deploying, with the following error:

12:45:01 PM: error #85907 GRAPHQL
12:45:01 PM: There was an error in your GraphQL query:
12:45:01 PM: - Unknown argument 'relativePath'. Source: document `optBuildRepoSrcComponentsImageJs2969191536` file: `GraphQL request`
12:45:01 PM: File: src/templates/publisher.js

Here is the content of src/templates/publisher.js:

import React from 'react';
import { graphql } from 'gatsby';
import Layout from '../components/layout';
import SEO from '../components/seo';
import ProjectPreview from '../components/project-preview';

import styles from '../pages/index.module.css';

const PublisherTemplate = ({ data }) => (
		<SEO title={} />
		<ul className={styles.grid}>
			{ => (
				<li key={} className={styles.item}>
					<ProjectPreview {...node} />

export default PublisherTemplate;

export const query = graphql`
	query PublisherTemplate($id: String) {
		strapiPublisher(id: { eq: $id }) {
			projects {
				featured_image {
					childImageSharp {
						fluid(maxWidth: 600) {

Here is the entire project:


  • System:
    • OS: Linux 4.15 Ubuntu 18.04.3 LTS (Bionic Beaver)
    • CPU: (4) x64 Intel® Core™ i5-7400 CPU @ 3.00GHz
    • Shell: 5.4.2 - /usr/bin/zsh
  • Binaries:
    • Node: 10.16.3 - /usr/bin/node
    • npm: 6.9.0 - /usr/bin/npm
  • Languages:
    • Python: 2.7.15+ - /usr/bin/python
  • Browsers:
    • Firefox: 69.0.1
  • npmPackages:
    • gatsby: ^2.13.73 => 2.13.73
    • gatsby-image: ^2.2.10 => 2.2.10
    • gatsby-plugin-manifest: ^2.2.6 => 2.2.6
    • gatsby-plugin-offline: ^2.2.7 => 2.2.7
    • gatsby-plugin-react-helmet: ^3.1.4 => 3.1.4
    • gatsby-plugin-sharp: ^2.2.13 => 2.2.13
    • gatsby-plugin-transition-link: ^1.12.4 => 1.12.4
    • gatsby-source-filesystem: ^2.1.11 => 2.1.11
    • gatsby-source-strapi: 0.0.9 => 0.0.9
    • gatsby-transformer-sharp: ^2.2.7 => 2.2.7
  • npmGlobalPackages:
    • gatsby-cli: 2.4.8

Any idea about what could go wrong? Thank you very much.

hi @TomFevrier - does the error occur when you are building locally?

No, building the site locally works fine… What bothers me is that the error seems to come from Gatsby (specifically gatsby-image) but it only occurs at deployment…

Next suggestion would be to sync up all the versions of your local software (node and yarn/npm) to make doublesure we’re building exactly the same code you are.

This article describes how to set versions:

Node and npm versions are the same, I don’t think the issue comes from here… Actually I also asked the Gatsby team about this problem but since it only occurs on Netlify deployment they couldn’t help me… Do you have any example of a functioning repo on Netlify using Gastby and gatsby-image?

Thanks for the additional information. I’ve not run into many reports of the issue you described. Can you try building your site locally using our build-image? This is described here. More specifically, is the section that has the steps to do this.

Can you let me know if the error also occurs when testing our build-image locally?

I am struggling to use the build-image, Docker just fails every time I try to pull it… However after changing some details in my config files, I now get the following error on deployment:

11:00:02 AM: error There was an error in your GraphQL query:
11:00:02 AM: - Unknown field 'file' on type 'Query'. Source: document `optBuildRepoSrcComponentsImageJs2969191536` file: `GraphQL request`

I really don’t know what to do…

Hi Tom,

I’m not sure what that error means. It looks like it’s something specific with Gatsbyjs. I do see that you were able to reproduce the issue locally ( Hopefully the folks at Gatsbyjs will be able to assist you.