cube-js/cube · info

Worker thread transpilation is enabled by default and cannot

Error message

Worker thread transpilation is enabled by default and cannot be disabled with CUBEJS_TRANSPILATION_WORKER_THREADS.

What it means

Transpilation in worker threads is a mandatory default in current Cube builds. Setting CUBEJS_TRANSPILATION_WORKER_THREADS=false no longer disables it; the env parser logs this warning and forces the value to true.

Source

Thrown at packages/cubejs-backend-shared/src/env.ts:334

    const explicitlySet = process.env.CUBEJS_TESSERACT_SQL_PLANNER !== undefined;
    const enabled = get('CUBEJS_TESSERACT_SQL_PLANNER').default('true').asBool();

    if (explicitlySet && !enabled) {
      displayCLIWarningOnce(
        'CUBEJS_TESSERACT_SQL_PLANNER',
        'Tesseract planner is a default one, but you are trying to use a legacy planner which will be removed in the near future.'
      );
    }

    return enabled;
  },
  transpilationWorkerThreads: () => {
    const enabled = get('CUBEJS_TRANSPILATION_WORKER_THREADS')
      .default('true')
      .asBoolStrict();

    if (!enabled) {
      console.warn(
        'Worker thread transpilation is enabled by default and cannot be disabled with CUBEJS_TRANSPILATION_WORKER_THREADS.'
      );
    }

    return true;
  },
  allowNonStrictDateRangeMatching: () => get('CUBEJS_PRE_AGGREGATIONS_ALLOW_NON_STRICT_DATE_RANGE_MATCH')
    .default('true')
    .asBoolStrict(),
  transpilationWorkerThreadsCount: () => get('CUBEJS_TRANSPILATION_WORKER_THREADS_COUNT')
    .default('0')
    .asInt(),
  // This one takes precedence over CUBEJS_TRANSPILATION_WORKER_THREADS
  transpilationNative: () => get('CUBEJS_TRANSPILATION_NATIVE')
    .default('false')
    .asBoolStrict(),
  nestedFoldersDelimiter: () => get('CUBEJS_NESTED_FOLDERS_DELIMITER')
    .default('')

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Remove the CUBEJS_TRANSPILATION_WORKER_THREADS env var since it no longer has an effect
  2. Accept worker-thread transpilation and tune related compile settings instead
  3. If worker threads cause a real problem, report it to Cube maintainers rather than relying on this flag

Example fix

// before
CUBEJS_TRANSPILATION_WORKER_THREADS=false
// after
# remove the variable entirely (worker threads are always on)
Defensive patterns

Strategy: validation

Validate before calling

if ('CUBEJS_TRANSPILATION_WORKER_THREADS' in process.env && process.env.CUBEJS_TRANSPILATION_WORKER_THREADS === 'false') {
  console.warn('CUBEJS_TRANSPILATION_WORKER_THREADS=false is ignored; worker threads are always enabled');
}

Prevention

When it happens

Trigger: The environment contains CUBEJS_TRANSPILATION_WORKER_THREADS set to 'false' (or any non-true strict-bool value); env.transpilationWorkerThreads() evaluates it and warns before returning true.

Common situations: Upgrading Cube from an older version where the flag still disabled worker threads; leftover flag in docker-compose/env files copied from older templates; attempts to avoid worker-thread overhead in constrained environments.

Related errors


AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02). Data as JSON: /api/errors/1a8fc12390296607. Report an issue: GitHub.