jdx/mise · error

unknown option

Error message

unknown {preset_name} option {key:?}

What it means

When expanding a daemon preset, an [options] table from user overrides is applied to the preset; every key must match an option the preset defines. Unknown keys are rejected so typos and stale options fail loudly instead of being silently ignored.

Solutions

  1. Correct the option key to one defined by the preset
  2. Remove the unknown option from the daemon's options table
  3. Run `mise daemon --help` or check the preset docs for valid option names

Example fix

# before
[daemons.db.options]
prot = 5432
# after
[daemons.db.options]
port = 5432
Defensive patterns

Strategy: validation

Validate before calling

# shell: check option names against the preset before running
mise daemon preset show postgres | grep -E 'options|port|database'

Prevention

When it happens

Trigger: Calling expand (via presets_render_local_persistent_daemons or named_instances_override_ports_and_keep_templates) with a daemon config whose options table contains a key not present in preset.options.

Common situations: Typo in an option name (e.g. 'prot' instead of 'port'); using an option that exists in one preset but not another; renaming preset options in a newer mise while old config remains.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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

Appendix: source

Thrown at src/daemons/presets.rs:71

    let port = overrides
        .remove("port")
        .map(|v| {
            v.as_integer()
                .and_then(|n| u16::try_from(n).ok())
                .filter(|n| *n > 0)
                .ok_or_else(|| {
                    eyre::eyre!("[daemons.{name}].port must be an integer from 1 to 65535")
                })
        })
        .transpose()?
        .unwrap_or(preset.port);
    if let Some(options) = overrides.remove("options") {
        let options = options
            .as_table()
            .ok_or_else(|| eyre::eyre!("daemon options must be a table"))?;
        for (key, value) in options {
            if !preset.options.contains_key(key) {
                bail!("unknown {preset_name} option {key:?}");
            }
            preset.options.insert(key.clone(), value.clone());
        }
    }
    let database = preset
        .options
        .get("database")
        .map(|value| {
            value
                .as_str()
                .ok_or_else(|| eyre::eyre!("options.database must be a string"))
        })
        .transpose()?
        .unwrap_or("postgres");
    // This name is also used as a URI component and SQL identifier.
    if database.is_empty()
        || !database
            .chars()

View on GitHub (pinned to 533346cc37)