DioxusLabs/dioxus · error · anyhow::Error

esbuild binary not found in archive

Error message

esbuild binary not found in archive (expected one of {}). Found entries: {}

What it means

Archive-layout guard in extract_binary_named_from_tgz: the whole tar.gz archive was iterated, no entry's normalized path matched any of the expected esbuild binary paths, and the collected entry list is reported. This means the downloaded release archive does not have the expected structure (upstream renamed/moved the binary or the wrong artifact was fetched) — the inputs at fault are the archive's actual entries versus the expected path set.

Solutions

  1. The esbuild archive does not contain the expected binary. Update dx, or install esbuild manually and put it on PATH.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/cli/src/esbuild.rs:143 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/5cf592a0161820c5. Report an issue: GitHub.

Appendix: source

Thrown at packages/cli/src/esbuild.rs:143

            let mut entry = entry.context("Failed to read tar entry")?;
            let path = entry.path().context("Failed to read entry path")?;
            let path_string = path.to_string_lossy().replace('\\', "/");

            if expected_paths.contains(&path_string) {
                let mut data = Vec::new();
                entry
                    .read_to_end(&mut data)
                    .context("Failed to read esbuild binary from archive")?;
                return Ok(data);
            }

            archive_entries.push(path_string);
        }

        archive_entries.sort();
        archive_entries.truncate(10);

        anyhow::bail!(
            "esbuild binary not found in archive (expected one of {}). Found entries: {}",
            expected_paths.join(", "),
            archive_entries.join(", ")
        );
    }

    /// Map the host platform to the npm package name for esbuild.
    ///
    /// esbuild publishes per-platform packages under `@esbuild/{name}`:
    /// - darwin-arm64, darwin-x64
    /// - linux-x64, linux-arm64
    /// - win32-x64, win32-arm64
    /// - freebsd-x64, freebsd-arm64
    fn npm_platform_package() -> Option<&'static str> {
        if cfg!(all(target_os = "macos", target_arch = "aarch64")) {
            Some("darwin-arm64")
        } else if cfg!(all(target_os = "macos", target_arch = "x86_64")) {
            Some("darwin-x64")

View on GitHub (pinned to 24f6a829df)