Troubleshooting
Run the failing command from the directory containing docskit.config.ts.
Start with the matching symptom below, then rerun pnpm check and pnpm build
after fixing the source.
The command opens package documentation instead of starting the site
In this repository, use pnpm docs:dev, with a colon. pnpm docs dev invokes
pnpm's built-in docs command. Inside your own docs project, use the starter's
pnpm dev script.
The CLI cannot find docskit.config.ts
Check your current directory. From this repository's root, use the docs:*
scripts, such as pnpm docs:check. In a generated project, run commands from the
folder containing its config and package.json.
The development port is occupied
Choose another port:
pnpm dev --port 3001
The CLI also accepts PORT. An explicit --port takes precedence. Stop an
existing development process with Ctrl+C before restarting it on the same port.
A page is missing from the sidebar
Creating a file creates its route, but does not add a navigation entry. Check the
matching navigation or apiNavigation array. Use the public route in href,
such as /docs/guides/setup/, and create the matching content file.
If the build reports duplicate routes, look for both guides.md and
guides/index.md. Keep one source
for each route. See Navigation and links.
A Markdown page fails to build
Every page needs title and description in YAML frontmatter. Markdown pages
can include JSX such as code tabs. Check the source filename in the error.
For tab errors, verify that labels are nonempty and unique, and that CodeTabs
contains only CodeTab elements. Keep blank lines around fenced code.
A logo or image is missing
Check both the file and its configured URL. public/logos/logo.svg is referenced
as /logos/logo.svg. Keep public/ out of the URL and leave the deployment base
path out of individual asset paths.
For this repository's logos, edit logos/ and run the normal docs dev or build
script so prepare.mjs refreshes packages/docs/public/logos/.
The favicon does not follow the site's theme switch
The navbar logo follows the site's selected theme. Favicon variants follow the
browser's color scheme. Check both light and dark assets and the browser's
appearance setting. See Branding.
Search is unavailable during development
Search needs a generated Pagefind index. Run pnpm build, then pnpm preview to
check the production index. After deployment, include the entire dist/
directory, including each version's pagefind/ files.
The index includes guides and API pages. Custom homepage content is excluded. Each documentation version searches its own content.
A snapshot is missing from the version selector
New snapshots are pending. They stay hidden from the selector and public builds
until you run pnpm exec docskit promote <id> after publishing that release.
Promoting a patch updates the existing docs line instead of adding another
selector entry. Lines use the minor version before 1.0 and the major version
from 1.0 onward. Check versions/versions.json: latest must name a published
snapshot, or be null before the first publication.
The selector can open when Next is the only entry. Creating a pending snapshot does not add another public choice. Restart development after changing publication state. See Versioning.
Next or an archived preview looks stale
Use the default development URLs while editing current content; those routes have
live updates. The /next/ and published version previews are built at startup.
Restart development to refresh them after changing snapshots or shared branding.
Use pnpm build and pnpm preview to check production's stable-default routes.
Links or assets break after subpath deployment
Set DOCS_BASE_PATH and DOCS_SITE_URL in the config and build with the host's
actual origin and path. Keep navigation links rooted at /docs/ or
/api-references/; prefixing each entry by hand can add the base path twice.
Upload the whole build to that path and check a nested page directly. See
Deployment.
An error mentions react-server or internal framework files
Use the public package entry points and start the site through the Docskit CLI.
Let it generate .docskit/; keep custom React components in your project and
select them through docskit.config.ts. Include the full command, terminal
error, Node version, and pnpm version when reporting a reproducible problem.