windmill-labs/windmill · error

JavaScript expression evaluation requires the `quickjs` feat

Error message

JavaScript expression evaluation requires the `quickjs` feature. Enable it with: cargo build --features quickjs

What it means

windmill-jseval is compiled with a stub when the `quickjs` cargo feature is off. Calling `eval_timeout_quickjs` in such a build always returns this error instead of evaluating JavaScript. It signals a build-configuration mismatch, not a runtime bug in the caller.

Source

Thrown at backend/windmill-jseval/src/lib.rs:1009

        Ok(unsafe_raw(result))
    })
    .await
}

// ── Fallback stubs when quickjs is disabled ──────────────────────────

#[cfg(not(feature = "quickjs"))]
pub async fn eval_timeout_quickjs(
    _expr: String,
    _transform_context: HashMap<String, Arc<Box<RawValue>>>,
    _flow_input: Option<mappable_rc::Marc<HashMap<String, Box<RawValue>>>>,
    _flow_env: Option<&HashMap<String, Box<RawValue>>>,
    _authed_client: Option<&windmill_common::client::AuthedClient>,
    _by_id: Option<&IdContext>,
    _ctx: Option<Vec<(String, String)>>,
) -> anyhow::Result<Box<RawValue>> {
    anyhow::bail!("JavaScript expression evaluation requires the `quickjs` feature. Enable it with: cargo build --features quickjs")
}

#[cfg(not(feature = "quickjs"))]
pub async fn eval_simple_js(
    _expr: String,
    _globals: HashMap<String, serde_json::Value>,
) -> anyhow::Result<Box<RawValue>> {
    anyhow::bail!("JavaScript expression evaluation requires the `quickjs` feature. Enable it with: cargo build --features quickjs")
}

// ── Tests ────────────────────────────────────────────────────────────

#[cfg(all(test, feature = "quickjs"))]
mod tests {
    use super::*;
    use serde_json::json;
    use windmill_common::worker::to_raw_value;

View on GitHub (pinned to e474e8803c)

Solutions

  1. Rebuild the backend with the quickjs feature: `cargo build --features quickjs`
  2. Use the official Windmill Docker image which enables quickjs
  3. Change the flow/script steps to a language available in the current build

Example fix

// before
cargo build
// after
cargo build --features quickjs
Defensive patterns

Strategy: fallback

Try / catch

match eval_timeout_quickjs(...).await {
  Err(e) if e.to_string().contains("quickjs") =>
    eprintln!("JS evaluation unavailable: rebuild backend with --features quickjs"),
  Err(e) => return Err(e.into()),
  Ok(v) => v,
}

Prevention

When it happens

Trigger: Calling `eval_timeout_quickjs` (e.g. from flow for-loop iteration expressions or JS code execution paths) on a backend binary built without `--features quickjs`.

Common situations: Deploying a backend built with default features where flow/scripts use JavaScript; self-compiled binaries missing the feature flag that the official Docker image includes.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/d7446f1cc8904162. Report an issue: GitHub.