jdx/mise · error

mise oci: no project mise config found in the current…

Error message

mise oci: no project mise config found in the current directory or any parent. Add a `mise.toml` to the project, or pass `--include-global` to use tools and [oci] settings from your global config (note: asdf/vfox plugins remain unsupported).

What it means

`mise oci build` requires a project-scoped mise config so it can discover tools and [oci] settings. mise walks up from the current directory looking for config files with a project root; if none exist, the build cannot proceed. The message points to --include-global as the escape hatch for global-config-only setups (asdf/vfox plugins are not supported in OCI builds).

Solutions

  1. Add a mise.toml with [tools] and [oci] settings at your project root
  2. Rerun with `mise oci build --include-global` to use the global config's tools and [oci] settings
  3. cd into your project directory before running mise oci build

Example fix

// before
$ cd /tmp && mise oci build
// after
cat > mise.toml <<'EOF'
[tools]
node = "22"
EOF
mise oci build
Defensive patterns

Strategy: validation

Validate before calling

[ -f mise.toml ] || [ -f .mise.toml ] || mise oci build --include-global

Try / catch

if ! mise oci build; then echo 'no project mise.toml — add one or use --include-global' >&2; fi

Prevention

When it happens

Trigger: Running `mise oci build` (via perform_build -> project_config_files) in a directory tree containing no mise.toml/mise.local.toml/etc. with a project root, without --include-global.

Common situations: Running oci build from a fresh/temp directory, inside a container, or from a repo that only defines tools in the global ~/.config/mise/config.toml.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/da6f8fbb4ac167ec. Report an issue: GitHub.

Appendix: source

Thrown at src/cli/oci/common.rs:108

}

/// Configs at-or-below the project root.
///
/// `cf.project_root().is_some()` is the right scope: it's None for the global
/// config, the system config, and parent-dir configs that live directly under
/// $HOME (e.g. `~/mise.toml` someone uses to set their default Node). It's
/// Some for any project config, including those walked up from CWD into a
/// monorepo root — which we *do* want included (sub-project + monorepo root
/// share the toolset of the deployable).
fn project_config_files(config: &Config) -> Result<ConfigMap> {
    let project_files: ConfigMap = config
        .config_files
        .iter()
        .filter(|(_, cf)| cf.project_root().is_some())
        .map(|(p, cf)| (p.clone(), cf.clone()))
        .collect();
    if project_files.is_empty() {
        bail!(
            "mise oci: no project mise config found in the current directory or any parent. \
             Add a `mise.toml` to the project, or pass `--include-global` to use tools and \
             [oci] settings from your global config (note: asdf/vfox plugins remain \
             unsupported)."
        );
    }
    Ok(project_files)
}

async fn build_project_toolset(
    config: &std::sync::Arc<Config>,
    project_files: ConfigMap,
) -> Result<crate::toolset::Toolset> {
    // ConfigScope::LocalOnly belt-and-suspenders: the project-files filter
    // already drops global/system, but LocalOnly *also* drops MISE_*_VERSION
    // ad-hoc overrides from the environment, which shouldn't bake into an
    // image either.
    ToolsetBuilder::new()

View on GitHub (pinned to 533346cc37)