Fix package problems

Start with wax doctor. Check the registry or your account only if the local project passes.

Check the project first

wax doctor

The default check is local and read only. Add --online when local checks pass but registry access is suspect. Add --auth for account or publication failures.

wax.lock does not match wax.json

The manifest text changed after resolution. If that change is intentional, run wax update. If it was accidental, restore the committed manifest. An offline install cannot repair a stale lock because repair requires resolution.

A dependency cannot be resolved

The error lists the packages, aliases, versions, and ranges that conflict. Common causes are incompatible major version requirements, a misspelled package name, or a range with no published version. Change a direct range or update the package that introduces the conflicting indirect dependency, then run wax update.

Offline install says an archive is missing

The lockfile is valid, but the selected cache lacks at least one archive. Run an online install once with the same cache path, then retry offline:

wax install --cache .build-cache/wax
wax install --cache .build-cache/wax --offline

Check WAX_CACHE_DIR and --cache if a populated cache appears empty.

A package fails an integrity check

Do not bypass the check. Use a fresh cache and run wax install online. If a new download still fails, the registry content disagrees with its metadata. Save the full error and report the package name and version.

Interrupted package state

doctor reports transaction or .wax-tmp and .wax-old residue without changing it. Run wax install to trigger recovery before making further dependency changes. If recovery fails, leave the project intact so the journal and previous package tree remain available for diagnosis.

Registry or TLS failures

wax doctor --online --registry URL

Public registries require HTTPS; plain HTTP is accepted only for loopback development registries. Set WAX_PACKAGE_CA_BUNDLE to a private CA's PEM bundle when needed. There is no insecure TLS option.

The default registry is https://packages.waxlang.dev. Check WAX_REGISTRY and the registry recorded in wax.lock if the command reaches the wrong service. Use --registry or WAX_REGISTRY to choose a registry when creating a lockfile. Never edit the lockfile manually.

Login or publishing failures

wax whoami
wax doctor --online --auth

Run wax login again when credentials have expired. If logout fails during a service outage, retry later; the local credential remains until remote revocation succeeds. Publication may also fail because the account lacks ownership, the version already exists, or the manifest uses a reserved prerelease or build version.

For exact syntax after identifying the operation, run wax <command> --help.