// Load variables from `.env` as soon as possible
require('dotenv').config({
path: `.env.${process.env.NODE_ENV || 'development'}`,
})
const clientConfig = require('./client-config')
const isProd = process.env.NODE_ENV === 'production'
module.exports = {
flags: {
FAST_DEV: true,
DEV_SSR: false,
},
plugins: [
'gatsby-plugin-postcss',
'gatsby-plugin-react-helmet',
{
resolve: `gatsby-plugin-sharp`,
options: {
defaults: {
formats: [`auto`, `webp`],
placeholder: `blurred`,
defaultQuality: 50,
backgroundColor: `transparent`,
},
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-image`,
{
resolve: `gatsby-plugin-purgecss`,
options: {
printRejected: false,
tailwind: true,
},
},
{
resolve: 'gatsby-plugin-svgr',
options: {
prettier: true,
svgo: true,
replaceAttrValues: {
'#000000': 'currentColor',
'#000': 'currentColor',
},
},
},
`gatsby-plugin-modal-routing-3`,
{
resolve: 'gatsby-plugin-sanity-image',
options: {
...clientConfig.sanity,
customImageTypes: ['SanityPreviewImage', 'SanityFigure', 'SanitySlide'],
defaultImageConfig: {
quality: 35,
maxWidth: 1000,
fit: 'clip',
auto: 'format',
},
},
},
{
resolve: 'gatsby-source-sanity',
options: {
...clientConfig.sanity,
token: process.env.SANITY_READ_TOKEN,
watchMode: !isProd,
overlayDrafts: !isProd,
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `maryannunger.com`,
short_name: `maryannunger`,
description: 'Website for the estate of Mary Ann Unger.',
start_url: `/`,
background_color: `#1f1f1f`,
theme_color: `#1f1f1f`,
display: `minimal-ui`,
icon: 'src/assets/images/favicon.png',
},
},
{
resolve: `gatsby-plugin-netlify`,
},
],
}
Summary
Previous to December 7, 2022 Netlify automatic deploys using a connected git repo with our Gatsby site worked fine. On December 7 they began failing with no major changes to the repo that would seem to effect build.
I've troubleshooted some related issues with the build but the root cause seems to be this package:
Here is a screenshot. For the complete log please see the build logs section below.

Steps to reproduce
This is a live Sanity project that will only build properly with a Sanity CMS connected. To keep our CMS data safe here are instructions to recreate the entire project on your own Sanity instance:
Part 1 - To build the site locally
npm install --legacy-peer-depsgraphql-deploycommand in project root directorynpm run dev. The site will be live at localhost:8000 (you'll have to whitelist your localhost on the Sanity CMS of course)npm run buildnetlify deployornetlify deploy --prodto see that it worksPart 2 - Getting the repo to fail using Netlify CI automatic deploys
A link to a reproduction repository
https://github.com/MAU-Estate/public-testing-repo
Plugin version
3.6.2
More information about your build
netlify.toml)What OS are you using?
Mac OS
Your netlify.toml file
`netlify.toml`
Configuration
`gatsby-config.js` and options
Environment
Environment
Gatsby info
gatsby info
Your _redirects file
`_redirects`
Builds logs (or link to your logs)
Build logs
Function logs
Function logs