Skip to content

docs: search returns no results on main, and docs#build fails #505

Description

@emmanuel-musau

Two problems in docs/. They need to be fixed together.

1. Search returns no results on main

fumadocs-core@16.14 replaced Orama with zbsearch as the static search engine. initOrama is deprecated (renamed initDB) and is now typed (locale?: string) => AnyZBSearch | Promise<AnyZBSearch>.

docs/components/search.tsx still hands it an @orama/orama instance:

import { create } from "@orama/orama"

async function initOrama() {
  return await create({ schema: { _: "string" }, language: "english" })
}
...
  // @ts-ignore - Orama type mismatch with fumadocs-core
  initOrama,

fumadocs then calls zbsearch.load(db, data) on it. Reproduced against the real exported index:

A. Orama instance    -> load(): no throw (silently accepts)
                        search(): TypeError: Cannot read properties of undefined
B. zbsearch instance -> load(): ok
                        search(): 2043 hits

The index itself is fine only the client engine is mismatched. In the browser it surfaces as an empty results list with nothing logged to the console, which is why the @ts-ignore was the only signal.

2. docs#build fails

docs/tsconfig.json sets "baseUrl": "."error TS5101 on TypeScript 6.x. This is what makes 🏗 Build red on every open PR, including Dependabot's.

Why this hasn't been noticed

The published site still works because it is a stale build. Last successful docs deploy was e433aca7 (2026-07-29) on fumadocs-core@16.12.1, when Orama was still correct.

Important

Fixing only (2) turns the build green and lets docs.yml fire on the next human merge deploying the broken search. A partial fix is worse than the current state.

Proposed fix

  1. docs/tsconfig.json — remove "baseUrl": ".". All four paths entries are already relative, so they resolve against the tsconfig location.
  2. docs/components/search.tsx — delete the custom initOrama, the @orama/orama import, and the @ts-ignore; fall back to the fumadocs default DB init. The custom function only hardcoded language: "english".
  3. docs/package.json — drop @orama/orama, now unused.

Verify with pnpm build (6/6 green) and by exercising the search dialog against a local dev server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions