The Gatsby project successfully compiles locally; however, it encounters a failure when deployed on Netlify. Below is the deployment log showing various processes including dependency installation and plugin loading. The issue arises specifically with the error stating ‘gatsby-source-airtable’ threw an error while executing the sourceNodes lifecycle. Can someone clarify what this error implies and how to resolve it? Below is the configuration set in gatsby-config.js for Airtable use:javascript { resolve: `gatsby-source-airtable`, options: { apiKey: process.env.AIRTABLE_API_KEY, concurrency: 5, tables: [ { baseId: baseId, tableName: `Company`, queryName: true, tableLinks: [ `Discounts`, `Company_Logos`, ], }, { baseId: baseId, tableName: `Averages`, mapping: { Name: `text/markdown` }, }, { baseId: baseId, tableName: `Discounts`, tableLinks: [`Discount`], }, ], }, }, Here’s the list of dependencies: json "gatsby-source-airtable": "^2.1.1", "react": "^16.12.0", "gatsby-source-graphql": "^2.7.6", I have previously attempted to clear node_modules and the yarn.lock file, but the issue persists on Netlify despite successful local builds.
From my experience working with Gatsby and Airtable, this error can sometimes occur due to API Key or baseId configuration nuances. Check whether the environment variables for AIRTABLE_API_KEY and other sensitive data are properly set in Netlify’s dashboard. On several occasions, I found that mismatches or absence of these values in environment settings on Netlify can cause deployment failures which don’t appear locally. Always ensure your environment variables are accurately configured both locally and in your deployment service platform.