{"record":{"id":"5cf592a0161820c5","repo":"DioxusLabs/dioxus","slug":"esbuild-binary-not-found-in-archive-expected-one","errorCode":null,"errorMessage":"esbuild binary not found in archive (expected one of {}). Found entries: {}","messagePattern":"esbuild binary not found in archive \\(expected one of (.+?)\\)\\. Found entries: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/esbuild.rs","lineNumber":143,"sourceCode":"            let mut entry = entry.context(\"Failed to read tar entry\")?;\n            let path = entry.path().context(\"Failed to read entry path\")?;\n            let path_string = path.to_string_lossy().replace('\\\\', \"/\");\n\n            if expected_paths.contains(&path_string) {\n                let mut data = Vec::new();\n                entry\n                    .read_to_end(&mut data)\n                    .context(\"Failed to read esbuild binary from archive\")?;\n                return Ok(data);\n            }\n\n            archive_entries.push(path_string);\n        }\n\n        archive_entries.sort();\n        archive_entries.truncate(10);\n\n        anyhow::bail!(\n            \"esbuild binary not found in archive (expected one of {}). Found entries: {}\",\n            expected_paths.join(\", \"),\n            archive_entries.join(\", \")\n        );\n    }\n\n    /// Map the host platform to the npm package name for esbuild.\n    ///\n    /// esbuild publishes per-platform packages under `@esbuild/{name}`:\n    /// - darwin-arm64, darwin-x64\n    /// - linux-x64, linux-arm64\n    /// - win32-x64, win32-arm64\n    /// - freebsd-x64, freebsd-arm64\n    fn npm_platform_package() -> Option<&'static str> {\n        if cfg!(all(target_os = \"macos\", target_arch = \"aarch64\")) {\n            Some(\"darwin-arm64\")\n        } else if cfg!(all(target_os = \"macos\", target_arch = \"x86_64\")) {\n            Some(\"darwin-x64\")","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/esbuild.rs#L125-L161","documentation":"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.","triggerScenarios":"Thrown at packages/cli/src/esbuild.rs:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The esbuild archive does not contain the expected binary. Update dx, or install esbuild manually and put it on PATH."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}