cube-js/cube · error · Error

You are using ${process.env} platform on x86 which is not su

Error message

You are using ${process.env} platform on x86 which is not supported by Cube Store

What it means

Thrown by getTarget() when running on an x86 (process.arch === 'x64') platform that is not win32, linux, or darwin. Cube Store publishes prebuilt binaries only for specific platform/architecture combinations, so the wrapper cannot compute a Rust target triple and refuses to proceed. Note the message interpolates the whole process.env object (a library bug) — the real culprit is process.platform.

Source

Thrown at rust/cubestore/js-wrapper/src/utils.ts:14

import process from 'process';
import { displayCLIWarning, internalExceptions, detectLibc } from '@cubejs-backend/shared';

export function getTarget(): string {
  if (process.arch === 'x64') {
    switch (process.platform) {
      case 'win32':
        return 'x86_64-pc-windows-msvc';
      case 'linux':
        return `x86_64-unknown-linux-${detectLibc()}`;
      case 'darwin':
        return 'x86_64-apple-darwin';
      default:
        throw new Error(
          `You are using ${process.env} platform on x86 which is not supported by Cube Store`,
        );
    }
  }

  if (process.arch === 'arm64') {
    switch (process.platform) {
      case 'linux':
        switch (detectLibc()) {
          case 'gnu':
            return 'aarch64-unknown-linux-gnu';
          default:
            throw new Error(
              `You are using ${process.env} platform on arm64 with MUSL as standard library which is not supported by Cube Store, please use libc (GNU)`,
            );
        }
      case 'darwin':
        return 'aarch64-apple-darwin';

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Move the workload to a supported platform: linux (glibc or musl per detectLibc), macOS, or Windows on x64 — or use arm64 darwin/linux-gnu.
  2. Run Cube via the official Docker images, which bundle a supported Cube Store binary regardless of host OS.
  3. Deploy Cube Store as a separate standalone service on a supported machine and point Cube at it instead of auto-spawning locally.
  4. If you must stay on the unsupported OS, build cubestored from source (cargo build --release) and place it at the downloaded/latest/bin path so the download path is skipped.
  5. Ignore via isCubeStoreSupported() guard: skip local Cube Store startup when it returns false and configure an external instance.

Example fix

// before: getTarget() throws on unsupported platforms
const target = getTarget();
// after: check support first
import { isCubeStoreSupported } from '@cubejs-backend/cubestool/dist/utils';
if (!isCubeStoreSupported()) {
  console.warn('Cube Store has no prebuilt binary for this platform; using external Cube Store instance.');
} else {
  const target = getTarget();
}
Defensive patterns

Strategy: type-guard

Validate before calling

import process from 'process';
import { isCubeStoreSupported } from '@cubejs-backend/cubestool/dist/utils';
if (!isCubeStoreSupported()) {
  // route to external Cube Store / Docker instead of local spawn
}

Type guard

function cubeStorePlatformSupported(p: NodeJS.Platform, a: string): boolean {
  if (a === 'x64') return ['win32','linux','darwin'].includes(p);
  if (a === 'arm64') return p === 'darwin' || p === 'linux';
  return false;
}

Try / catch

try {
  const target = getTarget();
} catch (e) {
  if (/not supported by Cube Store/.test(String(e))) {
    useExternalCubeStore(); // skip local binary download entirely
  } else { throw e; }
}

Prevention

When it happens

Trigger: getTarget() is called by currentTarget()/downloadBinaryFromRelease() on process.arch === 'x64' with process.platform being anything other than 'win32', 'linux', or 'darwin' (e.g. freebsd, openbsd, aix, sunos).

Common situations: Running Cube (or its Cube Store autostart) on FreeBSD/OpenBSD servers or other Unix variants; running under unusual/emulated environments reporting exotic platform strings; containers or CI images based on non-glibc/non-supported OSes where platform detection yields an unsupported value.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


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