Package Manager Errors
This page is generated by
scripts/docs/gen-error-code-docs.pyfrom thePackageErrorenum insrc/package/error.rs. Do not edit it by hand. Change the wording in the#[error("…")]format strings of that file, then rerunpython 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
| Variant | Error text (Display, English is the actual output) | Meaning |
|---|---|---|
ProjectExists | Project already exists: {0} | The target directory already exists (yx init never overwrites it) |
NotProject | Not a YaoXiang project: yaoxiang.toml not found | The current directory is not a YaoXiang project: no yaoxiang.toml was found |
DependencyNotFound | Dependency not found: {0} | The dependency is not declared in yaoxiang.toml |
DependencyAlreadyExists | Dependency already exists: {0} | The dependency is already declared in yaoxiang.toml |
DependencyInstallFailed | dependency installation failed: {0} | One or more dependencies failed to install |
InvalidManifest | Invalid yaoxiang.toml format: {0} | yaoxiang.toml has an invalid format or incomplete content |
Cache | cache error: {0} | Reading or writing the global package cache failed (RFC-014 Phase 3) |
NotWorkspace | not a YaoXiang workspace: [workspace] section not found | The current directory is not inside a workspace: no yaoxiang.toml contains a [workspace] section (RFC-014c) |
MemberMissing | workspace member '{key}' not found: {path} | The manifest of a workspace member is missing (RFC-014c) |
MemberInvalid | workspace member '{key}' invalid: {reason} | The manifest of a workspace member cannot be parsed or is invalid (RFC-014c) |
NestedWorkspace | nested workspace is not supported: member '{key}' at {path} has its own [workspace] section | Nested workspaces are not supported: a member carries its own [workspace] section (RFC-014c) |
PackageTooLarge | package too large: {0} | The source package exceeds the 20 MiB limit (RFC-014a) |
ChecksumMismatch | checksum mismatch: expected {expected}, got {actual} | The checksum does not match: the downloaded content differs from the lock file record (RFC-014a) |
InvalidPackage | invalid package: {0} | The package archive is invalid: it lacks a manifest, escapes its path, or holds an illegal entry type (RFC-014a) |
Network | network error: {0} | The network request failed (GitHub adapter, RFC-014a Phase 4) |
RateLimited | rate limited: {0} | The API rate limit was reached (RFC-014a decision 6) |
RegistryDeferred | official 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) |
VersionAlreadyExists | release already exists: {0} | The release of that version already exists (RFC-014a publish validation) |
AuthFailed | auth failed: {0} | Authentication failed: the credentials are missing, invalid, or rejected (RFC-014a) |
PublishTarget | publish target unresolved: {0} | The publish target repository cannot be resolved |
TestsFailed | tests failed: {0} | The pre-publish tests did not pass (RFC-014a publish validation, step 3) |
Io | IO error: {0} | The underlying I/O failed: disk space, permissions, a file held open, and the like |
Toml | TOML parse error: {0} | TOML serialization or deserialization failed (applies to lock files and manifests) |
Variant Details
ProjectExists
- Meaning: The target directory already exists (
yx initnever 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.tomlwas 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.tomlhas 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.tomlcontains 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 --githubor--dry-runinstead (RFC-014a decision 1) - Text:
official registry is deferred (RFC-014a); usepublish --githubor--dry-run`` - Source doc:
Barepublishwithout 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:
| Symptom | Related variants | Action |
|---|---|---|
yaoxiang.toml not found | NotProject / NotWorkspace | Run the command inside the project root; in a workspace, check that one yaoxiang.toml contains a [workspace] section |
| Manifest or lock file fails to parse | InvalidManifest / Toml | Check the TOML syntax of yaoxiang.toml and yaoxiang.lock |
| A dependency cannot be added or removed | DependencyNotFound / DependencyAlreadyExists / DependencyInstallFailed | List the current dependencies with yx list; if the dependency already exists, remove it with yx rm and install it again |
| A workspace member is invalid | MemberMissing / MemberInvalid / NestedWorkspace | Check the paths under [workspace] members; nested workspaces are not supported, so flatten the structure |
| Publishing or network failures | Network / RateLimited / AuthFailed / RegistryDeferred / VersionAlreadyExists / PublishTarget / TestsFailed | The 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 cache | PackageTooLarge / InvalidPackage / ChecksumMismatch / Cache | The source package limit is 20 MiB; a checksum mismatch means the download is corrupted, so clear the cache and retry |
| Underlying I/O | Io | Check 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?
- Check the network connection
- Confirm that the dependency name and the version constraint are correct
- Run
yx updateto 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.
