{"record":{"id":"cfb6f36e0f6e5996","repo":"DioxusLabs/dioxus","slug":"no-esbuild-binary-available-for-this-platform","errorCode":null,"errorMessage":"No esbuild binary available for this platform","messagePattern":"No esbuild binary available for this platform","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/esbuild.rs","lineNumber":60,"sourceCode":"\n    /// The path where we cache the esbuild binary.\n    fn installed_bin_path() -> PathBuf {\n        let dir = Workspace::tools_dir().join(format!(\"esbuild-{ESBUILD_VERSION}\"));\n        let name = if cfg!(windows) {\n            \"esbuild.exe\"\n        } else {\n            \"esbuild\"\n        };\n        dir.join(name)\n    }\n\n    /// Download esbuild from the npm registry and extract the binary.\n    ///\n    /// esbuild publishes platform-specific packages to npm as tar.gz archives.\n    /// Each archive contains `package/bin/esbuild[.exe]`.\n    async fn install_from_npm() -> anyhow::Result<()> {\n        let platform = Self::npm_platform_package()\n            .ok_or_else(|| anyhow!(\"No esbuild binary available for this platform\"))?;\n\n        let registry = std::env::var(\"NPM_CONFIG_REGISTRY\")\n            .or_else(|_| std::env::var(\"npm_config_registry\"))\n            .unwrap_or_else(|_| \"https://registry.npmjs.org\".to_string());\n        let registry = registry.trim_end_matches('/');\n        let url = format!(\"{registry}/@esbuild/{platform}/-/{platform}-{ESBUILD_VERSION}.tgz\");\n\n        tracing::info!(\"Installing esbuild v{ESBUILD_VERSION} from {url}...\");\n\n        let bytes = reqwest::get(&url)\n            .await\n            .with_context(|| format!(\"Failed to download esbuild from {url}\"))?\n            .bytes()\n            .await\n            .context(\"Failed to read esbuild download response\")?;\n\n        // Extract `package/bin/esbuild[.exe]` from the tar.gz\n        let binary_data = Self::extract_binary_from_tgz(&bytes)?;","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/esbuild.rs#L42-L78","documentation":"Raised by Esbuild::install_from_npm when no platform-specific npm package (tar.gz archive) matching the current OS/architecture can be identified in the esbuild npm registry listing, so the binary cannot be downloaded and cached in the tools directory.","triggerScenarios":"Thrown at packages/cli/src/esbuild.rs:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["No esbuild binary exists for this platform. Install esbuild manually."],"exampleFix":null,"handlingStrategy":"fallback","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"}