cube-js/cube · critical · Error

You are using ${process.env} platform on arm64 with MUSL as

Error message

You are using ${process.env} platform on arm64 with MUSL as standard library which is not supported by Cube Store, please use libc (GNU)

What it means

Cube Store's JS wrapper (rust/cubestore/js-wrapper/src/utils.ts, getTarget) resolves the native binary target triple for the current platform. On arm64 Linux only GNU libc is supported; when detectLibc() reports MUSL (e.g. Alpine), it throws because no MUSL arm64 Cube Store binary is published. Note the message incorrectly interpolates ${process.env} instead of ${process.platform}, so it prints an object dump.

Source

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

      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';
      default:
        throw new Error(
          `You are using ${process.env} platform on arm64 which is not supported by Cube Store`,
        );
    }
  }

  throw new Error(
    `You are using ${process.arch} architecture on ${process.platform} platform which is not supported by Cube Store`,
  );
}

export function isCubeStoreSupported(): boolean {

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Switch to a Debian/GNU-based image (node:20-bookworm or the official cubejs/cube image) instead of Alpine
  2. Run Cube Store as a separate container from the official cubejs/cubestore image and connect remotely (CUBEJS_CUBE_STORE_REMOTE settings)
  3. Build Cube Store from Rust source (cargo build --release in rust/cubestore) and point CUBEJS_CUBE_STORE_BINARY_PATH at the binary
  4. Fall back to x64 GNU where both MUSL/GNU builds exist, if arm64 is not a hard requirement

Example fix

// before (Dockerfile)
FROM node:20-alpine
// after
FROM node:20-bookworm
Defensive patterns

Strategy: validation

Validate before calling

import { detectLibc } from '@cubejs-backend/shared';
if (process.arch === 'arm64' && process.platform === 'linux' && detectLibc() !== 'gnu') {
  throw new Error('Cube Store requires GNU libc on arm64 Linux; use a Debian-based image.');
}

Prevention

When it happens

Trigger: process.arch === 'arm64', process.platform === 'linux', and detectLibc() !== 'gnu' when getTarget() is called (via currentTarget) to locate the Cube Store native binary.

Common situations: Running Cube (npm install / cubejs-server) inside an Alpine arm64 container, e.g. node:20-alpine on Apple Silicon or Graviton hosts; MUSL-based minimal images for edge deployments.

Related errors


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