mui/material-ui · error · Error

docs-infra: Missing description in the page: ${location}\n

Error message

docs-infra: Missing description in the page: ${location}\n

What it means

prepareMarkdown requires every docs page to declare a description (the `description:` frontmatter header). The description drives the SEO meta description and social preview. If both the description header and a derived description are empty/missing, the build aborts and names the offending file via ${location}.

Source

Thrown at packages-internal/markdown/prepareMarkdown.mjs:115

      const description = headers.description || getDescription(markdown);

      if (title == null || title === '') {
        throw new Error(`docs-infra: Missing title in the page: ${location}\n`);
      }

      if (title.length > 70) {
        throw new Error(
          [
            `docs-infra: The title "${title}" is too long (${title.length} characters).`,
            'It needs to have fewer than 70 characters—ideally less than 60. For more details, see:',
            'https://developers.google.com/search/docs/advanced/appearance/title-link',
            '',
          ].join('\n'),
        );
      }

      if (description == null || description === '') {
        throw new Error(`docs-infra: Missing description in the page: ${location}\n`);
      }

      if (description.length > 160) {
        throw new Error(
          [
            `docs-infra: The description "${description}" is too long (${description.length} characters).`,
            'It needs to have fewer than 170 characters—ideally less than 160. For more details, see:',
            'https://ahrefs.com/blog/meta-description/#4-be-concise',
            '',
          ].join('\n'),
        );
      }

      if (description.slice(-1) !== '.' && description.slice(-1) !== '!') {
        throw new Error(
          `docs-infra: The description "${description}" should end with a "." or "!", those are sentences.`,
        );
      }

View on GitHub (pinned to bdc96df2cb)

Solutions

  1. Add a `description:` header to the page's frontmatter with a one-sentence summary (ending in '.' or '!', see error 8).
  2. Check the error's ${location} to find the exact file to edit.
  3. Re-run `pnpm docs:build` to confirm.

Example fix

---
title: My Page
---
// after
---
title: My Page
description: A concise summary of what this page covers.
---
Defensive patterns

Strategy: validation

Validate before calling

function hasDescription(headers) {
  const d = headers.description;
  return typeof d === 'string' && d.trim().length > 0;
}
// assert hasDescription(headers) before building the page

Prevention

When it happens

Trigger: Authoring a markdown page with no `description:` header (and no extractable description); renaming/deleting the header during edits.

Common situations: New docs page created by duplicating a template that lacked the header; translation file missing the description that the English source has.

Related errors


AI-assisted analysis of mui/material-ui@bdc96df2cb (2026-08-12). Data as JSON: /api/errors/594d02117c1930bf. Report an issue: GitHub.