gatsbyjs/gatsby · error

The type.MediaItem.lazyNodes option isn't supported in Gatsb

Error message

The type.MediaItem.lazyNodes option isn't supported in Gatsby v4+ due to query running using JS workers in PQR (Parallell Query Running). lazyNodes creates nodes in GraphQL resolvers and PQR doesn't support that.

If you would like to prevent gatsby-source-wordpress from fetching File nodes for each MediaItem node, set the type.MediaItem.createFileNodes option to false.

What it means

Error "The type.MediaItem.lazyNodes option isn't supported in Gatsby v4+ due to query running using JS workers in PQR (Parallell Query Running). lazyNodes creates nodes in GraphQL resolvers and PQR doesn't support that. If you would like to prevent gatsby-source-wordpress from fetching File nodes for each MediaItem node, set the type.MediaItem.createFileNodes option to false." thrown in gatsbyjs/gatsby.

Source

Thrown at packages/gatsby-source-wordpress/src/steps/process-and-validate-plugin-options.ts:29

  helpers: GatsbyNodeApiHelpers
}

interface IOptionsProcessor {
  name: string
  test: (options: IProcessorOptions) => boolean
  processor: (options: IProcessorOptions) => IPluginOptions | void
}

let warnedAboutMediaItemLazyNodes = false

const optionsProcessors: Array<IOptionsProcessor> = [
  {
    name: `MediaItem.lazyNodes doesn't work in Gatsby v4+`,
    test: ({ userPluginOptions }): boolean =>
      userPluginOptions?.type?.MediaItem?.lazyNodes,
    processor: ({ helpers, userPluginOptions }): IPluginOptions => {
      if (usingGatsbyV4OrGreater) {
        helpers.reporter.panic(
          formatLogMessage(
            `The type.MediaItem.lazyNodes option isn't supported in Gatsby v4+ due to query running using JS workers in PQR (Parallell Query Running). lazyNodes creates nodes in GraphQL resolvers and PQR doesn't support that.\n\nIf you would like to prevent gatsby-source-wordpress from fetching File nodes for each MediaItem node, set the type.MediaItem.createFileNodes option to false.`
          )
        )
      } else if (!warnedAboutMediaItemLazyNodes) {
        warnedAboutMediaItemLazyNodes = true
        helpers.reporter.warn(
          formatLogMessage(
            `\nThe type.MediaItem.lazyNodes option wont be supported in Gatsby v4+ due to query running using JS workers in PQR (Parallell Query Running). lazyNodes creates nodes in GraphQL resolvers and PQR doesn't support that.\n\nThis option works with your current version of Gatsby but will stop working in Gatsby v4+.\n\nIf you would like to prevent gatsby-source-wordpress from fetching File nodes for each MediaItem node, set the type.MediaItem.createFileNodes option to false instead.\n`
          )
        )
      }

      return userPluginOptions
    },
  },
  {
    name: `pluginOptions.type.MediaItem.limit is not allowed`,

View on GitHub (pinned to 8b06340921)

Solutions

  1. Remove the type.MediaItem.lazyNodes option from gatsby-config.js.
  2. To avoid fetching File nodes for MediaItems, set type.MediaItem.createFileNodes to false instead.

When it happens

Trigger: Thrown at packages/gatsby-source-wordpress/src/steps/process-and-validate-plugin-options.ts:29 when the library encounters an invalid state.

Common situations: Occurs when type.MediaItem.lazyNodes is enabled in Gatsby v4+, which is incompatible with Parallel Query Running. Remove lazyNodes and set type.MediaItem.createFileNodes to false if File nodes are unwanted.


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