Troubleshoot the LitPage CLI
Diagnose access, file output, version conflicts, and uncertain publication by checking the right receipt or public page.
Start with the error code and the last operation you attempted. The CLI writes errors as JSON on standard error. Its success receipt can also describe a setup issue or a partially completed local export. Before retrying a write, find out whether the draft or publication already exists.
Access and target site
Run npx @litpage/cli --version and npx @litpage/cli doctor in the terminal or local agent session that will run the command. Check the doctor status and key permissions. When multiple sites are available, resolve the intended subdomain and specify one target. If a key can read content but cannot write, check its permissions in Builder. Follow the setup guide to confirm the shell environment and access without showing the key value.
Resolve a local file or syntax error
| What you see | What to do |
|---|---|
VALIDATION_ERROR on a command | Read help for that exact command and check required values and flags. |
OUTPUT_EXISTS | Choose a fresh filename. Use the supported overwrite option only when you intend to replace that file. |
| Offline validation warnings | Check the Markdown body, uploaded image URLs, and links to public routes. |
meta.localOutput.status is failed after a successful page write | The mutation was accepted. Use its receipt and pull the page into a new file to recover the export. |
See CLI help for which output format to expect. A file request and a server write can have different results.
Check the state before retrying a publication
A page version conflict means the page or shared navigation changed since the snapshot you submitted. Pull a new copy, compare it with the intended changes, and preserve the correct version pointers. A lost response or REQUEST_OUTCOME_UNKNOWN needs a different response. Check the management and public state first. For a page publication you need to retry, rerun the same command with the original saved draft and the same local CLI state. If you supplied an explicit operation ID, reuse it.
After the server accepts a page publish, a mismatched public revision means the verification step has yet to see the expected result. Check meta.publication and meta.delivery separately. Re-run npx @litpage/cli page verify --file published.page.yaml after checking the public URL. For Markdown content, check the site, type, language and slug in Builder and compare the visible article with the intended revision before sending another publish command. See update a published page for the versioned workflow.