DioxusLabs/dioxus · error
esbuild not found on PATH and downloads are disabled
Error message
esbuild not found on PATH and downloads are disabled
What it means
Failure of Esbuild::get_or_install when downloads are disabled (CliSettings::prefer_no_downloads, e.g. offline/CI mode) and no esbuild executable is discoverable via which::which on PATH. The toolchain cannot transform JS/JSX without either the system binary or the downloaded one.
Solutions
- esbuild is not on PATH and downloads are disabled. Install esbuild manually or enable automatic downloads.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at packages/cli/src/esbuild.rs:22 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/74be5a1f1bfa15d3.
Report an issue: GitHub.
Appendix: source
Thrown at packages/cli/src/esbuild.rs:22
//! previous SWC Rust library dependencies. The standalone Go binary is
//! downloaded from the npm registry and cached locally.
use crate::{CliSettings, Workspace};
use anyhow::{Context, anyhow};
use std::path::PathBuf;
/// Pinned esbuild version.
const ESBUILD_VERSION: &str = "0.27.3";
pub(crate) struct Esbuild;
impl Esbuild {
/// Ensure the esbuild binary is available, downloading if needed.
/// Returns the path to the binary.
pub(crate) async fn get_or_install() -> anyhow::Result<PathBuf> {
if CliSettings::prefer_no_downloads() {
which::which("esbuild")
.map_err(|_| anyhow!("esbuild not found on PATH and downloads are disabled"))
} else {
let path = Self::installed_bin_path();
if !path.exists() {
Self::install_from_npm().await?;
}
Ok(path)
}
}
/// Return the esbuild binary path if it's already been installed or is on PATH.
/// This is a sync check intended for use after `verify_tooling` has been called.
pub(crate) fn path_if_installed() -> Option<PathBuf> {
let path = Self::installed_bin_path();
if path.exists() {
Some(path)
} else {
which::which("esbuild").ok()
}View on GitHub (pinned to 24f6a829df)