Skip to content

Troubleshooting

Find the message you see, or the problem you have. Each entry says what causes it and how to fix it, and links the page that covers the fix.

The CLI prints each error after archidocs: . It then exits with code 2. The error messages here are copied from the CLI’s source, so they match what you see.

archidocs: No workspace.yaml found in this folder, its archidocs/ folder, or any folder above.

Cause: the command needs a Workspace, the folder that holds workspace.yaml. It looks in the current folder, in its archidocs/ folder, and in every folder above. None of them has the file.

Fix: run the command from inside the Workspace repo. If the repo has no Workspace yet, create one:

Terminal window
archidocs init
Wrote archidocs/workspace.yaml

init prints more lines after this one. In a code repo whose architecture lives in another repo, pass --workspace <dir> to archidocs dev instead. The quick start creates a Workspace from scratch.

Symptom: archidocs dev serves the viewer, and the C2 Landscape shows a blank canvas.

Cause: init writes a workspace.yaml with no Projects, the folders where each Team keeps its part of the Model. With no Project, the Model has no Elements, the boxes a View draws. So there is nothing to draw.

Fix: add a Project, then a System and its Services. The viewer reloads as you save. See Add a Project and Add a Service.

The site has no history, or diff can’t find a ref

Section titled “The site has no history, or diff can’t find a ref”

Symptom: the published viewer shows only the latest Revision, the Workspace as it was at one commit. Or archidocs diff in CI stops on a ref that exists:

archidocs: Unknown ref or date "HEAD~1"; a date names the last Revision at or before it.

Cause: the CI checkout is shallow. actions/checkout fetches only the latest commit by default, and GitLab only the latest few. Git then has no older commits to read.

Fix: check out the full history. On GitHub, set fetch-depth: 0 on actions/checkout. On GitLab, set the GIT_DEPTH variable to 0. See Publish to GitHub Pages and Publish to another host. For a branch you diff against, see Review changes with diff.

A PR preview has no base to compare against

Section titled “A PR preview has no base to compare against”
archidocs: origin/main is not in this checkout; fetch the base branch before building (archidocs never fetches).

Cause: archidocs build --preview reads the base branch from origin/<base>, and the checkout doesn’t have it. Archidocs never fetches on its own.

Fix: check out with fetch-depth: 0, or fetch the base branch before the build:

Terminal window
git fetch origin main

If the base branch isn’t main, name it with --base. See Preview pull requests.

archidocs dev can’t start: the port is in use

Section titled “archidocs dev can’t start: the port is in use”
archidocs: Port 4321 is in use; pick another with --port.

Cause: another program, or another archidocs dev, already listens on the port. dev serves on port 4321 unless you pick another.

Fix: stop the other server, or serve on another port:

Terminal window
archidocs dev --port 4000

See archidocs dev.

Symptom: installing the CLI warns about an unsupported engine, or archidocs fails before it runs a command.

Cause: Archidocs needs Node.js 22.18 or later.

Fix: check your version, then install a newer Node.js if it is older than 22.18:

Terminal window
node --version
v24.14.0

In CI, set the Node.js version on the setup step. The GitHub Action sets up Node.js 24 unless its node-version input says otherwise. See the quick start and the GitHub Action reference.

Symptom: archidocs check reports no errors on your machine, and errors in CI. Or the reverse.

Cause: the two run different versions of the CLI. A newer version can add a check rule or change one.

Fix: compare the versions. Run this in both places:

Terminal window
archidocs version
archidocs 1.2.0 (Bundle schemaVersion 1)

Then run the same version in both. Pin it in CI with the version input of the GitHub Action or the GitLab template, and install that version locally. The Changelog says what changed in each release. Each check rule’s page says how to fix what it reports.

Documents Archidocs v1.4.0, the latest release.