jdx/mise · error
pkgx bottle for did not contain
Error message
pkgx bottle for {} did not contain {} What it means
After downloading and extracting a pkgx bottle (prebuilt package archive), mise expects the resulting prefix directory to exist at the expected install location. This error means the extracted bottle did not produce the expected directory, so the install would be silently broken; mise fails fast instead.
Solutions
- Retry the install to re-download a fresh, complete bottle
- Update the package to a newer version whose bottle layout matches current expectations
- Report/track an upstream pkgx layout change; pin to a version with a known-good bottle
Defensive patterns
Strategy: retry
Validate before calling
# verify the bottle prefix exists after install [ -d "$(mise where pkgx:<pkg> 2>/dev/null)" ] && echo OK || echo MISSING
Try / catch
match install_result {
Err(e) if e.to_string().contains("did not contain") => {
// retry install once; if it persists, pin a different version
}
r => r?,
} Prevention
- Retry installs that fail once before pinning around them
- Keep locks updated so bottle layouts match current expectations
- Report persistent layout mismatches as upstream pkgx issues
When it happens
Trigger: install_package copies or renames the extracted temporary bottle directory into pkgx_root, then checks prefix.exists(); the prefix is missing — the bottle archive layout changed or extraction produced different paths. Called from install_version_ and install_from_locked.
Common situations: Upstream pkgx changed bottle directory layout for a package version; truncated/corrupted bottle download whose extraction silently produced an empty or differently-named tree; a stale lock referencing an old bottle shape.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- is not a mise bin. Perhaps you need to install it first.
- brew-cask: command wrapper
- brew-cask: completion artifact
- brew-cask: : conflicts with installed cask
- cannot install # : does not exist
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/1962ebacf73bb166.
Report an issue: GitHub.
Appendix: source
Thrown at src/backend/pkgx.rs:620
format,
&ExtractOptions {
strip_components: 0,
pr: Some(ctx.pr.as_ref()),
preserve_mtime: false,
},
)?;
if tmp
.path()
.join(&package.name)
.join(format!("v{}", package.version))
.exists()
{
file::copy_dir_all(tmp.path(), pkgx_root)?;
} else {
file::rename(tmp.path(), &prefix)?;
}
if !prefix.exists() {
bail!(
"pkgx bottle for {} did not contain {}",
package.name,
prefix.display()
);
}
file::write(package_receipt_path(&prefix), package_receipt(bottle))?;
Ok(())
}
fn package_is_installed(prefix: &Path, bottle: &PkgxPackageInfo) -> Result<bool> {
if !prefix.exists() {
return Ok(false);
}
if fs::read_to_string(package_receipt_path(prefix)).ok() == Some(package_receipt(bottle)) {
return Ok(true);
}
file::remove_all(prefix)?;
Ok(false)View on GitHub (pinned to 533346cc37)