DioxusLabs/dioxus · error

Incorrect wasm-bindgen-cli version: project requires version

Error message

Incorrect wasm-bindgen-cli version: project requires version {} but version {} is installed

What it means

Version check in WasmBindgen::verify_local_install: the wasm-bindgen binary found on PATH reports an --version different from the version the project requires. The faulting input is the mismatched installed binary; rerunning install() replaces it with the correct pinned version.

Source

Thrown at packages/cli/src/wasm_bindgen.rs:366

    async fn verify_local_install(&self) -> anyhow::Result<()> {
        tracing::trace!(
            "Verifying wasm-bindgen-cli@{} is installed in the path",
            self.version
        );

        let binary = self.get_binary_path()?;
        let output = Command::new(binary)
            .args(["--version"])
            .output()
            .await
            .context("Failed to check wasm-bindgen-cli version")?;

        let stdout = String::from_utf8(output.stdout)
            .context("Failed to extract wasm-bindgen-cli output")?;

        let installed_version = stdout.trim_start_matches("wasm-bindgen").trim();
        if installed_version != self.version {
            return Err(anyhow!(
                "Incorrect wasm-bindgen-cli version: project requires version {} but version {} is installed",
                self.version,
                installed_version,
            ));
        }

        Ok(())
    }

    async fn verify_managed_install(&self) -> anyhow::Result<()> {
        tracing::trace!(
            "Verifying wasm-bindgen-cli@{} is installed in the tool directory",
            self.version
        );

        let binary_name = self.installed_bin_name();
        let path = self.install_dir()?.join(binary_name);

View on GitHub (pinned to 24f6a829df)

Solutions

  1. The installed wasm-bindgen-cli version does not match the project. Install the exact required version.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/cli/src/wasm_bindgen.rs:366 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/18b7e33ac5bcec9c. Report an issue: GitHub.