Skip to content

Package Manager Errors ​

This page is generated by scripts/docs/gen-error-code-docs.py from the PackageError enum in src/package/error.rs. Do not edit it by hand. Change the wording in the #[error("…")] format strings of that file, then rerun python scripts/docs/gen-error-code-docs.py.

The errors of the package manager (yx install / add / rm / update / publish / cache / workspace) carry no E code: they are the variants of the Rust enum PackageError defined by thiserror, printed at the CLI layer as Error: <rendered format string>, outside the compiler's diagnostic rendering pipeline. There are 23 variants, defined in src/package/error.rs. See the error code reference for compiler diagnostic codes.

Variant Overview ​

VariantError text (Display, English is the actual output)Meaning
ProjectExistsProject already exists: {0}The target directory already exists (yx init never overwrites it)
NotProjectNot a YaoXiang project: yaoxiang.toml not foundThe current directory is not a YaoXiang project: no yaoxiang.toml was found
DependencyNotFoundDependency not found: {0}The dependency is not declared in yaoxiang.toml
DependencyAlreadyExistsDependency already exists: {0}The dependency is already declared in yaoxiang.toml
DependencyInstallFaileddependency installation failed: {0}One or more dependencies failed to install
InvalidManifestInvalid yaoxiang.toml format: {0}yaoxiang.toml has an invalid format or incomplete content
Cachecache error: {0}Reading or writing the global package cache failed (RFC-014 Phase 3)
NotWorkspacenot a YaoXiang workspace: [workspace] section not foundThe current directory is not inside a workspace: no yaoxiang.toml contains a [workspace] section (RFC-014c)
MemberMissingworkspace member '{key}' not found: {path}The manifest of a workspace member is missing (RFC-014c)
MemberInvalidworkspace member '{key}' invalid: {reason}The manifest of a workspace member cannot be parsed or is invalid (RFC-014c)
NestedWorkspacenested workspace is not supported: member '{key}' at {path} has its own [workspace] sectionNested workspaces are not supported: a member carries its own [workspace] section (RFC-014c)
PackageTooLargepackage too large: {0}The source package exceeds the 20 MiB limit (RFC-014a)
ChecksumMismatchchecksum mismatch: expected {expected}, got {actual}The checksum does not match: the downloaded content differs from the lock file record (RFC-014a)
InvalidPackageinvalid package: {0}The package archive is invalid: it lacks a manifest, escapes its path, or holds an illegal entry type (RFC-014a)
Networknetwork error: {0}The network request failed (GitHub adapter, RFC-014a Phase 4)
RateLimitedrate limited: {0}The API rate limit was reached (RFC-014a decision 6)
RegistryDeferredofficial registry is deferred (RFC-014a); use \publish --github` or `--dry-run``The official registry is not open yet: use publish --github or --dry-run instead (RFC-014a decision 1)
VersionAlreadyExistsrelease already exists: {0}The release of that version already exists (RFC-014a publish validation)
AuthFailedauth failed: {0}Authentication failed: the credentials are missing, invalid, or rejected (RFC-014a)
PublishTargetpublish target unresolved: {0}The publish target repository cannot be resolved
TestsFailedtests failed: {0}The pre-publish tests did not pass (RFC-014a publish validation, step 3)
IoIO error: {0}The underlying I/O failed: disk space, permissions, a file held open, and the like
TomlTOML parse error: {0}TOML serialization or deserialization failed (applies to lock files and manifests)

Variant Details ​

ProjectExists ​

  • Meaning: The target directory already exists (yx init never overwrites it)
  • Text: Project already exists: {0}
  • Source doc: Project directory already exists

NotProject ​

  • Meaning: The current directory is not a YaoXiang project: no yaoxiang.toml was found
  • Text: Not a YaoXiang project: yaoxiang.toml not found
  • Source doc: Not inside a YaoXiang project (no yaoxiang.toml found)

DependencyNotFound ​

  • Meaning: The dependency is not declared in yaoxiang.toml
  • Text: Dependency not found: {0}
  • Source doc: Dependency not found in manifest

DependencyAlreadyExists ​

  • Meaning: The dependency is already declared in yaoxiang.toml
  • Text: Dependency already exists: {0}
  • Source doc: Dependency already exists in manifest

DependencyInstallFailed ​

  • Meaning: One or more dependencies failed to install
  • Text: dependency installation failed: {0}
  • Source doc: One or more dependencies could not be installed

InvalidManifest ​

  • Meaning: yaoxiang.toml has an invalid format or incomplete content
  • Text: Invalid yaoxiang.toml format: {0}
  • Source doc: Invalid manifest format

Cache ​

  • Meaning: Reading or writing the global package cache failed (RFC-014 Phase 3)
  • Text: cache error: {0}
  • Source doc: Global package cache error (RFC-014 Phase 3)

NotWorkspace ​

  • Meaning: The current directory is not inside a workspace: no yaoxiang.toml contains a [workspace] section (RFC-014c)
  • Text: not a YaoXiang workspace: [workspace] section not found
  • Source doc: Not inside a YaoXiang workspace (no [workspace] in any yaoxiang.toml, RFC-014c)

MemberMissing ​

  • Meaning: The manifest of a workspace member is missing (RFC-014c)
  • Text: workspace member '{key}' not found: {path}
  • Source doc: Workspace member manifest missing (RFC-014c)

MemberInvalid ​

  • Meaning: The manifest of a workspace member cannot be parsed or is invalid (RFC-014c)
  • Text: workspace member '{key}' invalid: {reason}
  • Source doc: Workspace member manifest invalid (RFC-014c)

NestedWorkspace ​

  • Meaning: Nested workspaces are not supported: a member carries its own [workspace] section (RFC-014c)
  • Text: nested workspace is not supported: member '{key}' at {path} has its own [workspace] section
  • Source doc: Nested workspace (forbidden, RFC-014c 2026-09-15 decision 4)

PackageTooLarge ​

  • Meaning: The source package exceeds the 20 MiB limit (RFC-014a)
  • Text: package too large: {0}
  • Source doc: Package content exceeds the source-package size limit (RFC-014a 2026-09-15 decision 7: 20 MiB)

ChecksumMismatch ​

  • Meaning: The checksum does not match: the downloaded content differs from the lock file record (RFC-014a)
  • Text: checksum mismatch: expected {expected}, got {actual}
  • Source doc: Checksum mismatch (RFC-014a)

InvalidPackage ​

  • Meaning: The package archive is invalid: it lacks a manifest, escapes its path, or holds an illegal entry type (RFC-014a)
  • Text: invalid package: {0}
  • Source doc: Invalid package archive (missing manifest, path escape, bad entry type, ...)

Network ​

  • Meaning: The network request failed (GitHub adapter, RFC-014a Phase 4)
  • Text: network error: {0}
  • Source doc: Network request failed (GitHub adapter, RFC-014a Phase 4)

RateLimited ​

  • Meaning: The API rate limit was reached (RFC-014a decision 6)
  • Text: rate limited: {0}
  • Source doc: API rate limit exhausted (RFC-014a decision 6)

RegistryDeferred ​

  • Meaning: The official registry is not open yet: use publish --github or --dry-run instead (RFC-014a decision 1)
  • Text: official registry is deferred (RFC-014a); use publish --githubor--dry-run``
  • Source doc: Bare publish without a channel (official registry deferred, RFC-014a decision 1)

VersionAlreadyExists ​

  • Meaning: The release of that version already exists (RFC-014a publish validation)
  • Text: release already exists: {0}
  • Source doc: Release for the version already exists (RFC-014a publish validation)

AuthFailed ​

  • Meaning: Authentication failed: the credentials are missing, invalid, or rejected (RFC-014a)
  • Text: auth failed: {0}
  • Source doc: Authentication failed (RFC-014a)

PublishTarget ​

  • Meaning: The publish target repository cannot be resolved
  • Text: publish target unresolved: {0}
  • Source doc: Publish target repository could not be resolved

TestsFailed ​

  • Meaning: The pre-publish tests did not pass (RFC-014a publish validation, step 3)
  • Text: tests failed: {0}
  • Source doc: Pre-publish tests failed (RFC-014a publish validation step 3)

Io ​

  • Meaning: The underlying I/O failed: disk space, permissions, a file held open, and the like
  • Text: IO error: {0}
  • Source doc: IO error

Toml ​

  • Meaning: TOML serialization or deserialization failed (applies to lock files and manifests)
  • Text: TOML parse error: {0}
  • Source doc: TOML serialization/deserialization error

How to Handle Them ​

Grouped by family:

SymptomRelated variantsAction
yaoxiang.toml not foundNotProject / NotWorkspaceRun the command inside the project root; in a workspace, check that one yaoxiang.toml contains a [workspace] section
Manifest or lock file fails to parseInvalidManifest / TomlCheck the TOML syntax of yaoxiang.toml and yaoxiang.lock
A dependency cannot be added or removedDependencyNotFound / DependencyAlreadyExists / DependencyInstallFailedList the current dependencies with yx list; if the dependency already exists, remove it with yx rm and install it again
A workspace member is invalidMemberMissing / MemberInvalid / NestedWorkspaceCheck the paths under [workspace] members; nested workspaces are not supported, so flatten the structure
Publishing or network failuresNetwork / RateLimited / AuthFailed / RegistryDeferred / VersionAlreadyExists / PublishTarget / TestsFailedThe official registry is not open yet, so pass --github or --dry-run explicitly when publishing; retry after a rate limit; check the token when the credentials are rejected
Package contents or cachePackageTooLarge / InvalidPackage / ChecksumMismatch / CacheThe source package limit is 20 MiB; a checksum mismatch means the download is corrupted, so clear the cache and retry
Underlying I/OIoCheck the free disk space, the file permissions, and whether the file is held open by another process

FAQ ​

Q: What should I do when a dependency fails to install? ​

  1. Check the network connection
  2. Confirm that the dependency name and the version constraint are correct
  3. Run yx update to refresh the index

Q: What should I do when the vendor directory is corrupted? ​

Clear the cache and install again: yx cache clean, then yx install.

Q: Why does publishing report that the official registry is not open? ​

This is the expected behaviour (decision 1 of RFC-014a). Publish to a GitHub release with yx publish --github, or add --dry-run to validate locally first.