angular/angular-cli · info

Documentation index for v${finalSearchedVersion} not found o

Error message

Documentation index for v${finalSearchedVersion} not found or empty. Falling back to v${LATEST_KNOWN_DOCS_VERSION}.

What it means

The MCP doc-search tool found zero hits for a version newer than the last known stable docs version, meaning that version's search index likely does not exist yet. The tool warns and falls back to LATEST_KNOWN_DOCS_VERSION.

Source

Thrown at packages/angular/cli/src/commands/mcp/tools/doc-search.ts:168

  return async ({ query, includeTopContent, version }: DocSearchInput) => {
    let finalSearchedVersion = Math.max(
      version ?? LATEST_KNOWN_DOCS_VERSION,
      MIN_SUPPORTED_DOCS_VERSION,
    );

    let allHits: Record<string, unknown>[] | undefined;
    try {
      allHits = await performSearch(query, finalSearchedVersion);
    } catch (error) {
      logger.warn(`Error searching Angular v${finalSearchedVersion} documentation: ${error}`);
    }

    // If the initial search for a newer-than-stable version returns no results, it may be because
    // the index for that version doesn't exist yet. In this case, fall back to the latest known
    // stable version.
    if ((!allHits || allHits.length === 0) && finalSearchedVersion > LATEST_KNOWN_DOCS_VERSION) {
      logger.warn(
        `Documentation index for v${finalSearchedVersion} not found or empty. Falling back to v${LATEST_KNOWN_DOCS_VERSION}.`,
      );
      finalSearchedVersion = LATEST_KNOWN_DOCS_VERSION;
      try {
        allHits = await performSearch(query, finalSearchedVersion);
      } catch (error) {
        logger.warn(
          `Error searching fallback Angular v${finalSearchedVersion} documentation: ${error}`,
        );
      }
    }

    if (!allHits?.length) {
      return {
        content: [
          {
            type: 'text' as const,
            text: `No results found for query "${query}" in Angular v${finalSearchedVersion} documentation.`,

View on GitHub (pinned to bb72145f9a)

Solutions

  1. Search against the latest stable Angular version instead of a prerelease.
  2. Update @angular/cli so LATEST_KNOWN_DOCS_VERSION includes your target version.
  3. Verify the version string is a real released version (no typos like '99.0.0').

Example fix

// before
{ "tool": "search_docs", "arguments": { "query": "signal", "version": "21.0.0-next.0" } }
// after
{ "tool": "search_docs", "arguments": { "query": "signal", "version": "20.0.0" } }
Defensive patterns

Strategy: fallback

Validate before calling

if (requestedVersion > LATEST_KNOWN_DOCS_VERSION) requestedVersion = LATEST_KNOWN_DOCS_VERSION;

Type guard

function isKnownDocsVersion(v: number): boolean { return v <= LATEST_KNOWN_DOCS_VERSION; }

Try / catch

if (requestedVersion > LATEST_KNOWN_DOCS_VERSION) { logger.warn('index missing; using stable'); requestedVersion = LATEST_KNOWN_DOCS_VERSION; }

Prevention

When it happens

Trigger: Querying docs with a version greater than LATEST_KNOWN_DOCS_VERSION (e.g. a next/prerelease) while `performSearch` returns an empty result set.

Common situations: Searching documentation for a newly released or prerelease Angular version before its search index is published; passing an explicit future version to the MCP doc search tool.

Related errors


AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30). Data as JSON: /api/errors/b0db0012afc24450. Report an issue: GitHub.