zellij-org/zellij · error · ConfigError
The layout was not found
Error message
The layout was not found
What it means
ConfigError::IoPath produced by Layout::from_assets when the requested builtin layout name is none of default, strider, classic, welcome. The match's None | Some(_) wildcard converts any unrecognized name into an io::Error with the path attached, indicating a builtin asset lookup miss rather than a filesystem failure.
Source
Thrown at zellij-utils/src/input/layout.rs:1653
"Compact layout swap".into(),
Self::stringified_compact_swap_from_assets()?,
)),
)),
Some("classic") => Ok((
"Classic layout".into(),
Self::stringified_classic_from_assets()?,
Some((
"Classiclayout swap".into(),
Self::stringified_classic_swap_from_assets()?,
)),
)),
Some("welcome") => Ok((
"Welcome screen layout".into(),
Self::stringified_welcome_from_assets()?,
None,
)),
None | Some(_) => Err(ConfigError::IoPath(
std::io::Error::new(std::io::ErrorKind::Other, "The layout was not found"),
path.into(),
)),
}
}
pub fn stringified_default_from_assets() -> Result<String, ConfigError> {
Ok(String::from_utf8(setup::DEFAULT_LAYOUT.to_vec())?)
}
pub fn stringified_default_swap_from_assets() -> Result<String, ConfigError> {
Ok(String::from_utf8(setup::DEFAULT_SWAP_LAYOUT.to_vec())?)
}
pub fn stringified_strider_from_assets() -> Result<String, ConfigError> {
Ok(String::from_utf8(setup::STRIDER_LAYOUT.to_vec())?)
}
pub fn stringified_strider_swap_from_assets() -> Result<String, ConfigError> {
Ok(String::from_utf8(setup::STRIDER_SWAP_LAYOUT.to_vec())?)
}
pub fn stringified_disable_status_from_assets() -> Result<String, ConfigError> {View on GitHub (pinned to 98a0837077)
Solutions
- Use a supported builtin name: default, strider, classic, or welcome
- For user layouts, place the .kdl file in the layout directory and reference it by name/path through the normal layout loader, not from_assets
- Check `zellij setup --check` for the layout search path and confirm the file exists there
Defensive patterns
Strategy: validation
Validate before calling
const BUILTIN_LAYOUTS: &[&str] = &["default", "strider", "classic", "welcome"];
fn layout_is_builtin(name: &str) -> bool {
BUILTIN_LAYOUTS.contains(&name)
} Type guard
fn is_builtin_layout(name: Option<&str>) -> bool {
matches!(name, Some("default") | Some("strider") | Some("classic") | Some("welcome"))
} Try / catch
match Layout::from_assets(&name) {
Ok((_, layout, _)) => Ok(layout),
Err(ConfigError::IoPath(e, path)) if e.to_string().contains("not found") => {
Err(anyhow!("builtin layout '{}' not found at {} — install it or use default", name, path.display()))
},
Err(e) => Err(e.into()),
} Prevention
- Use only the four builtin names with from_assets; resolve user layouts through the layout-dir loader
- Run `zellij setup --check` to confirm layout search paths
- Verify layout names in configs with `zellij setup --check` or a dry run
When it happens
Trigger: Requesting a builtin layout asset by a name outside the four known ones, e.g. `zellij setup --dump-layout mylayout` or code calling Layout::from_assets(Some("custom")) expecting user layouts to resolve.
Common situations: Confusing builtin assets with user layouts installed under the layout dir; typos in layout names; kdl configs referencing a layout that was never installed.
Related errors
- Swap Layout not found for: {}
- '{}' is out of date, run `cargo xtask assets`
- duplicate top-level identifier '{}' declared in both '{}.js'
- dynamic import is not supported at {}
- unrecognised import syntax at {}
AI-assisted analysis of zellij-org/zellij@98a0837077 (2026-08-16).
Data as JSON: /api/errors/f7b134abe51e2c39.
Report an issue: GitHub.