windmill-labs/windmill · error

R is not available because the feature is not enabled

Error message

R is not available because the feature is not enabled

What it means

R script execution is gated behind the optional `rlang` cargo feature. When an R job is dispatched to a worker binary built without that feature, execution fails immediately with this error because the R runtime is not compiled in.

Source

Thrown at backend/windmill-worker/src/worker.rs:6826

                    conn,
                    client,
                    parent_runnable_path,
                    inner_content: &code,
                    job_dir,
                    requirements_o: lock.as_ref(),
                    shared_mount: &shared_mount,
                    base_internal_url,
                    worker_name,
                    envs,
                    occupancy_metrics,
                }))
                .await
            }
        }
        ScriptLang::Rlang => {
            #[cfg(not(feature = "rlang"))]
            return Err(
                anyhow::anyhow!("R is not available because the feature is not enabled").into(),
            );

            #[cfg(feature = "rlang")]
            {
                if run_inline {
                    return Err(Error::internal_err(
                        "Inline execution is not yet supported for this language".to_string(),
                    ));
                }
                Box::pin(handle_r_job(JobHandlerInputRlang {
                    mem_peak,
                    canceled_by,
                    job,
                    conn,
                    client,
                    parent_runnable_path,
                    inner_content: &code,
                    job_dir,

View on GitHub (pinned to e474e8803c)

Solutions

  1. Rebuild the worker with `--features rlang`
  2. Deploy/route to a worker image that includes R support
  3. Use another language if R support is not needed

Example fix

// before
cargo run --features quickjs
// after
cargo run --features quickjs,rlang
Defensive patterns

Strategy: fallback

Try / catch

try {
  await runScript("rlang", code);
} catch (e) {
  if (String(e).includes("R is not available")) {
    // rebuild with --features rlang or reroute to an R-enabled worker
  }
}

Prevention

When it happens

Trigger: Running a script with language `rlang` (R) against a worker built without `--features rlang` (default dev build, minimal feature set, or an image without R).

Common situations: Minimal self-hosted deployments, dev backends started with default features, workspaces where R scripts exist but no R-capable worker is attached.

Related errors


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