gatsbyjs/gatsby · error

ContentTypesMissing

ContentTypesMissing

Error message

Please check if your contentTypeFilter is configured properly. Content types were filtered down to none.

What it means

Error "Please check if your contentTypeFilter is configured properly. Content types were filtered down to none." thrown in gatsbyjs/gatsby.

Source

Thrown at packages/gatsby-source-contentful/src/create-schema-customization.js:28

import { makeTypeName } from "./normalize"

async function getContentTypesFromContentful({
  cache,
  reporter,
  pluginConfig,
}) {
  // Get content type items from Contentful
  const allContentTypeItems = await fetchContentTypes({
    pluginConfig,
    reporter,
  })

  const contentTypeFilter = pluginConfig.get(`contentTypeFilter`)

  const contentTypeItems = allContentTypeItems.filter(contentTypeFilter)

  if (contentTypeItems.length === 0) {
    reporter.panic({
      id: CODES.ContentTypesMissing,
      context: {
        sourceMessage: `Please check if your contentTypeFilter is configured properly. Content types were filtered down to none.`,
      },
    })
  }

  // Check for restricted content type names and set id based on useNameForId
  const useNameForId = pluginConfig.get(`useNameForId`)
  const restrictedContentTypes = [`entity`, `reference`, `asset`]

  if (pluginConfig.get(`enableTags`)) {
    restrictedContentTypes.push(`tag`)
  }

  contentTypeItems.forEach(contentTypeItem => {
    // Establish identifier for content type
    //  Use `name` if specified, otherwise, use internal id (usually a natural-language constant,

View on GitHub (pinned to 8b06340921)

Solutions

  1. Remove or fix the contentTypeFilter option in gatsby-config.js so at least one content type remains.
  2. Check the filter function or regex matches actual Contentful content type IDs (they are case-sensitive).

When it happens

Trigger: Thrown at packages/gatsby-source-contentful/src/create-schema-customization.js:28 when the library encounters an invalid state.

Common situations: Occurs in gatsby-source-contentful when the contentTypeFilter plugin option excludes every content type in the space. Check that the filter function in gatsby-config.js returns true for at least one content type.


AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13). Data as JSON: /api/errors/9073c0f9a99a5d5e. Report an issue: GitHub.