{"record":{"id":"b51829911cf32d13","repo":"gatsbyjs/gatsby","slug":"the-type-mediaitem-lazynodes-option-wont-be-suppo","errorCode":null,"errorMessage":"\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","messagePattern":"\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","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-wordpress/src/steps/process-and-validate-plugin-options.ts","lineNumber":36,"sourceCode":"}\n\nlet warnedAboutMediaItemLazyNodes = false\n\nconst optionsProcessors: Array<IOptionsProcessor> = [\n  {\n    name: `MediaItem.lazyNodes doesn't work in Gatsby v4+`,\n    test: ({ userPluginOptions }): boolean =>\n      userPluginOptions?.type?.MediaItem?.lazyNodes,\n    processor: ({ helpers, userPluginOptions }): IPluginOptions => {\n      if (usingGatsbyV4OrGreater) {\n        helpers.reporter.panic(\n          formatLogMessage(\n            `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.`\n          )\n        )\n      } else if (!warnedAboutMediaItemLazyNodes) {\n        warnedAboutMediaItemLazyNodes = true\n        helpers.reporter.warn(\n          formatLogMessage(\n            `\\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`\n          )\n        )\n      }\n\n      return userPluginOptions\n    },\n  },\n  {\n    name: `pluginOptions.type.MediaItem.limit is not allowed`,\n    test: ({ userPluginOptions }): boolean =>\n      !!userPluginOptions?.type?.MediaItem?.limit,\n    processor: ({ helpers, userPluginOptions }): void => {\n      helpers.reporter.panic(\n        formatLogMessage(\n          `PluginOptions.type.MediaItem.limit is an disallowed plugin option.\\nPlease remove the MediaItem.limit option from gatsby-config.js (currently set to ${userPluginOptions?.type?.MediaItem?.limit})\\n\\nMediaItem nodes are automatically limited to 0 and then fetched only when referenced by other node types. For example as a featured image, in custom fields, or in post_content.`\n        )","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-source-wordpress/src/steps/process-and-validate-plugin-options.ts#L18-L54","documentation":"During process-and-validate-plugin-options, the options processor for MediaItem.lazyNodes fires this warning when lazyNodes is enabled on Gatsby versions below v4. The option conflicts with Gatsby v4's Parallel Query Runner (resolvers can't create nodes there — that case panics), so on v3 the plugin warns that the option is deprecated and recommends type.MediaItem.createFileNodes: false instead for skipping File nodes.","triggerScenarios":"Thrown at packages/gatsby-source-wordpress/src/steps/process-and-validate-plugin-options.ts:36 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace type.MediaItem.lazyNodes with type.MediaItem.createFileNodes: false in plugin options.","Remove lazyNodes entirely before upgrading to Gatsby v4+, where it panics.","Re-run the build to confirm MediaItems no longer create File nodes (if that was the goal)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}