gatsbyjs/gatsby · error
111001
111001
Error message
Please check if your localeFilter is configured properly. Locales '${allLocales.map(item => item.code).join(`,`)}' were found but were filtered down to none. What it means
sourceNodes applies the user's localeFilter option to the locales fetched from Contentful; if every locale is filtered out (empty result) it panics with the LocalesMissing code, listing the locale codes that existed before filtering. The fault is the filter predicate in gatsby-config, not Contentful.
Source
Thrown at packages/gatsby-source-contentful/src/source-nodes.js:174
} = await fetchContent({ syncToken, pluginConfig, reporter })
const contentTypeItems = await cache.get(CACHE_CONTENT_TYPES)
const locales = allLocales.filter(pluginConfig.get(`localeFilter`))
reporter.verbose(
`Default locale: ${defaultLocale}. All locales: ${allLocales
.map(({ code }) => code)
.join(`, `)}`
)
if (allLocales.length !== locales.length) {
reporter.verbose(
`After plugin.options.localeFilter: ${locales
.map(({ code }) => code)
.join(`, `)}`
)
}
if (locales.length === 0) {
reporter.panic({
id: CODES.LocalesMissing,
context: {
sourceMessage: `Please check if your localeFilter is configured properly. Locales '${allLocales
.map(item => item.code)
.join(`,`)}' were found but were filtered down to none.`,
},
})
}
// Update syncToken
const nextSyncToken = currentSyncData?.nextSyncToken
actions.setPluginStatus({
[CACHE_SYNC_TOKEN]: nextSyncToken,
})
fetchActivity.end()
View on GitHub (pinned to e85d62f177)
Solutions
- Fix localeFilter so at least one locale passes
- Remove localeFilter to use all locales
- Verify the space's locales match the filter's expectations
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/gatsby-source-contentful/src/source-nodes.js:174 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gatsbyjs/gatsby@e85d62f177 (2026-08-26).
Data as JSON: /api/errors/0969eac17206c1cf.
Report an issue: GitHub.