Gatsby-Source-Airtable FileNode mapping triggers DeprecationWarning

Hey folks, I’m stuck with a weird issue. When I run my Gatsby build, I’m getting this DeprecationWarning about OutgoingMessage.prototype._headers. It started happening after I added the image mapping to fileNode in my gatsby-source-airtable plugin options.

Here’s a snippet of my config:

{
  resolve: 'gatsby-source-airtable',
  options: {
    apiKey: process.env.AIRTABLE_KEY,
    tables: [
      {
        baseId: process.env.BASE_ID,
        tableName: process.env.TABLE_NAME,
        mapping: { picture: 'fileNode' },
      }
    ]
  }
}

I noticed gatsby-source-airtable uses gatsby-source-filesystem internally. Older versions of gatsby-source-filesystem (before 3.0.0) don’t show this warning.

I’m not sure if it’s coming from the Airtable plugin or Filesystem. Any ideas what might be causing this? Has anyone else run into this problem?

I encountered a similar issue with the DeprecationWarning when working on a Gatsby project recently. In my case, the problem was indeed related to outdated dependencies. After thorough investigation, I found that updating the gatsby-source-filesystem package to the latest version resolved the warning.

However, be cautious when updating packages, as it might introduce breaking changes. I’d suggest creating a backup of your project before proceeding with any updates. Also, check the changelog of gatsby-source-airtable to see if there are any known issues or fixes related to this warning.

If updating doesn’t solve the problem, you might want to consider using a different approach for image handling. In one of my projects, I switched to using Airtable’s attachment URLs directly instead of fileNode mapping, which eliminated the warning altogether.

I’ve dealt with this issue before. The DeprecationWarning is likely due to a mismatch between your Gatsby version and the gatsby-source-airtable plugin. First, try updating both Gatsby and the plugin to their latest versions. If that doesn’t work, you might need to downgrade gatsby-source-filesystem to version 2.x.x temporarily.

Another workaround is to use the ‘remote_url’ mapping instead of ‘fileNode’ for images. This bypasses the filesystem plugin entirely:

mapping: { picture: 'remote_url' }

This approach might impact build performance slightly but should resolve the warning. Remember to clear your cache and run a fresh build after making changes. If problems persist, consider opening an issue on the gatsby-source-airtable GitHub repository.

hey aroberts, i’ve seen this warning too. it’s probably from an older dependency somewhere. have u tried updating all ur packages? might fix it. also, check if ur gatsby version is up to date. if not, that could be the culprit. lemme know if that helps!