DioxusLabs/dioxus · error
Failed to merge inline config: {err}
Error message
Failed to merge inline config: {err} What it means
Raised in load_dioxus_config when the inline dioxus config embedded in the source file (via extract_inline_config_from_) fails to deserialize; {err} carries the TOML/deser detail. The faulting input is the inline `dioxus::Config` block in the Rust source, not Dioxus.toml.
Source
Thrown at packages/cli/src/workspace.rs:486
// Load base config from Dioxus.toml (if it exists)
let base_config: Option<DioxusConfig> = match &dioxus_conf_file {
Some(path) => {
let content = std::fs::read_to_string(path)?;
Some(toml::from_str(&content).map_err(|err| {
anyhow::anyhow!("Failed to parse Dioxus.toml at {path:?}: {err}")
})?)
}
None => None,
};
// Extract inline config from source file (if provided)
let inline_config = source_file.and_then(crate::config::extract_inline_config_from_file);
// Merge configs: inline overrides base
match (base_config, inline_config) {
(Some(base), Some(inline)) => crate::config::merge_with_inline_config(&base, inline)
.map(Some)
.map_err(|err| anyhow::anyhow!("Failed to merge inline config: {err}")),
(Some(base), None) => Ok(Some(base)),
(None, Some(inline)) => {
// No Dioxus.toml, but we have inline config - use defaults + inline
let base = DioxusConfig::default();
crate::config::merge_with_inline_config(&base, inline)
.map(Some)
.map_err(|err| anyhow::anyhow!("Failed to merge inline config: {err}"))
}
(None, None) => Ok(None),
}
}
/// Create a new gitignore map for this target crate
///
/// todo(jon): this is a bit expensive to build, so maybe we should cache it?
pub fn workspace_gitignore(workspace_dir: &Path) -> Gitignore {
let mut ignore_builder = ignore::gitignore::GitignoreBuilder::new(workspace_dir);
ignore_builder.add(workspace_dir.join(".gitignore"));View on GitHub (pinned to 24f6a829df)
Solutions
- The inline config could not be merged. Fix the inline config values passed to dx.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/cli/src/workspace.rs:486 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23).
Data as JSON: /api/errors/8d0b209aa1cae150.
Report an issue: GitHub.