zed-industries/zed · error

missing executable in directory {container_dir:?}

Error message

missing executable in directory {container_dir:?}

What it means

Guard in get_cached_ts_server_binary: neither the old nor the new TypeScript server path exists under the container directory, so no cached language server binary can be returned. The Option-based guard signals the caller to fall back to a fresh download.

Source

Thrown at crates/languages/src/typescript.rs:900

    node: &NodeRuntime,
) -> Option<LanguageServerBinary> {
    maybe!(async {
        let old_server_path = container_dir.join(TypeScriptLspAdapter::OLD_SERVER_PATH);
        let new_server_path = container_dir.join(TypeScriptLspAdapter::NEW_SERVER_PATH);
        if new_server_path.exists() {
            Ok(LanguageServerBinary {
                path: node.binary_path().await?,
                env: None,
                arguments: typescript_server_binary_arguments(&new_server_path),
            })
        } else if old_server_path.exists() {
            Ok(LanguageServerBinary {
                path: node.binary_path().await?,
                env: None,
                arguments: typescript_server_binary_arguments(&old_server_path),
            })
        } else {
            anyhow::bail!("missing executable in directory {container_dir:?}")
        }
    })
    .await
    .log_err()
}

#[cfg(test)]
mod tests {
    use std::path::Path;

    use gpui::{AppContext as _, BackgroundExecutor, Hsla, TestAppContext};
    use project::FakeFs;
    use rope::Rope;
    use serde_json::json;
    use task::TaskTemplates;
    use theme::SyntaxTheme;
    use unindent::Unindent;
    use util::{path, rel_path::rel_path};

View on GitHub (pinned to f4178619ac)

Solutions

  1. Delete the stale container directory so Zed re-downloads the TypeScript server
  2. Check disk space and permissions on the language-server cache directory
  3. Restart Zed to trigger a fresh server download
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/languages/src/typescript.rs:900 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/cc108a86e47f78c7. Report an issue: GitHub.