{"record":{"id":"d7446f1cc8904162","repo":"windmill-labs/windmill","slug":"javascript-expression-evaluation-requires-the-qui","errorCode":null,"errorMessage":"JavaScript expression evaluation requires the `quickjs` feature. Enable it with: cargo build --features quickjs","messagePattern":"JavaScript expression evaluation requires the `quickjs` feature\\. Enable it with: cargo build --features quickjs","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/windmill-jseval/src/lib.rs","lineNumber":1009,"sourceCode":"\n        Ok(unsafe_raw(result))\n    })\n    .await\n}\n\n// ── Fallback stubs when quickjs is disabled ──────────────────────────\n\n#[cfg(not(feature = \"quickjs\"))]\npub async fn eval_timeout_quickjs(\n    _expr: String,\n    _transform_context: HashMap<String, Arc<Box<RawValue>>>,\n    _flow_input: Option<mappable_rc::Marc<HashMap<String, Box<RawValue>>>>,\n    _flow_env: Option<&HashMap<String, Box<RawValue>>>,\n    _authed_client: Option<&windmill_common::client::AuthedClient>,\n    _by_id: Option<&IdContext>,\n    _ctx: Option<Vec<(String, String)>>,\n) -> anyhow::Result<Box<RawValue>> {\n    anyhow::bail!(\"JavaScript expression evaluation requires the `quickjs` feature. Enable it with: cargo build --features quickjs\")\n}\n\n#[cfg(not(feature = \"quickjs\"))]\npub async fn eval_simple_js(\n    _expr: String,\n    _globals: HashMap<String, serde_json::Value>,\n) -> anyhow::Result<Box<RawValue>> {\n    anyhow::bail!(\"JavaScript expression evaluation requires the `quickjs` feature. Enable it with: cargo build --features quickjs\")\n}\n\n// ── Tests ────────────────────────────────────────────────────────────\n\n#[cfg(all(test, feature = \"quickjs\"))]\nmod tests {\n    use super::*;\n    use serde_json::json;\n    use windmill_common::worker::to_raw_value;\n","sourceCodeStart":991,"sourceCodeEnd":1027,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/windmill-jseval/src/lib.rs#L991-L1027","documentation":"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.","triggerScenarios":"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`.","commonSituations":"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.","solutions":["Rebuild the backend with the quickjs feature: `cargo build --features quickjs`","Use the official Windmill Docker image which enables quickjs","Change the flow/script steps to a language available in the current build"],"exampleFix":"// before\ncargo build\n// after\ncargo build --features quickjs","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match eval_timeout_quickjs(...).await {\n  Err(e) if e.to_string().contains(\"quickjs\") =>\n    eprintln!(\"JS evaluation unavailable: rebuild backend with --features quickjs\"),\n  Err(e) => return Err(e.into()),\n  Ok(v) => v,\n}","preventionTips":["Build the backend with `--features quickjs` for any deployment running JS steps","Mirror the official image's feature set in self-built binaries","Detect the missing feature at deploy time, not at flow runtime"],"tags":["rust","feature-flag","javascript","build-config"],"backgroundTag":"missing-cargo-feature","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}