facebook/docusaurus · error · Error

Generating ${feedType} feed failed.

Error message

Generating ${feedType} feed failed.

What it means

Wrapper thrown by generateFeed when anything during feed generation fails — fetching feed config, computing content, applying XSLT, or writing the output file. The original error is preserved via {cause: err} and feedType (rss/atom/json) is included so you know which feed broke.

Source

Thrown at packages/docusaurus-plugin-content-blog/src/feed.ts:325

  generatePath: string;
  feedOptions: FeedOptions;
  contentPaths: BlogContentPaths;
}) {
  try {
    const feedConfig = FeedConfigs[feedType];

    let feedContent = feedConfig.getContent(feed);

    const xsltFilePath = feedConfig.getXsltFilePath(feedOptions.xslt);
    if (xsltFilePath) {
      await generateXsltFiles({xsltFilePath, contentPaths, generatePath});
      feedContent = injectXslt({feedContent, xsltFilePath});
    }

    const outputPath = path.join(generatePath, feedConfig.outputFileName);
    await fs.outputFile(outputPath, feedContent);
  } catch (err) {
    throw new Error(`Generating ${feedType} feed failed.`, {
      cause: err,
    });
  }
}

function shouldBeInFeed(blogPost: BlogPost): boolean {
  const excluded =
    blogPost.metadata.frontMatter.draft ||
    blogPost.metadata.frontMatter.unlisted;
  return !excluded;
}

export async function createBlogFeedFiles({
  blogPosts: allBlogPosts,
  options,
  siteConfig,
  outDir,
  locale,

View on GitHub (pinned to 3f483e80e3)

Solutions

  1. Inspect err.cause to find the real failure.
  2. Confirm the feed type and outputPath reported in the surrounding logs.
  3. Fix the underlying issue (XSLT, options, permissions) and rebuild.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await generateFeed({...});
} catch (err) {
  const cause = (err as Error & {cause?: Error}).cause;
  console.error(`Feed failed (${feedType}):`, cause ?? err);
}

Prevention

When it happens

Trigger: Any unhandled rejection inside the per-feedType generation try block: invalid feed options, XSLT injection failure, fs write permission errors, or downstream errors from feedConfig.getContent.

Common situations: Misconfigured feed options, a previously-undetected XSLT problem now reaching the generation step, disk full / permissions on the generatePath, or a malformed blog post metadata breaking getContent.

Related errors


AI-assisted analysis of facebook/docusaurus@3f483e80e3 (2026-08-12). Data as JSON: /api/errors/4f63c43ce3541fa2. Report an issue: GitHub.