chroma-core/chroma · critical · Error
Unsupported platform: ${platform}
Error message
Unsupported platform: ${platform} What it means
Thrown at module load time by chromadb's native-binding resolver (src/bindings.ts). The package ships precompiled Rust native modules (chromadb-js-bindings-*) only for darwin x64/arm64, linux x64/arm64 (gnu), and win32 arm64; when os.platform() returns anything else (e.g. freebsd, openbsd, android, aix, sunos, haiku) there is no binary to require and the module throws immediately. This only affects the embedded (in-process) Chroma runtime, not the HTTP client.
Source
Thrown at clients/new-js/packages/chromadb/src/bindings.ts:35
}
} else if (platform === "linux") {
if (arch === "arm64") {
binding = require("chromadb-js-bindings-linux-arm64-gnu");
} else if (arch === "x64") {
binding = require("chromadb-js-bindings-linux-x64-gnu");
} else {
throw new Error(`Unsupported architecture on Linux: ${arch}`);
}
} else if (platform === "win32") {
if (arch === "arm64") {
binding = require("chromadb-js-bindings-win32-arm64-msvc");
} else {
throw new Error(
`Unsupported Windows architecture: ${arch}. Only ARM64 is supported.`,
);
}
} else {
throw new Error(`Unsupported platform: ${platform}`);
}
export default binding;
View on GitHub (pinned to aecdd12c8a)
Solutions
- Run the workload on a supported platform: macOS x64/arm64, Linux x64/arm64 (glibc), or Windows ARM64.
- If you only need to talk to a Chroma server, avoid the embedded bindings entirely: use ChromaClient/CloudClient pointed at a running server URL instead of the embedded runtime.
- For unsupported Unix systems, run chroma in Docker or as a separate server process and connect over HTTP from any platform.
- If you must embed on an unsupported platform, build the Rust bindings from source for that target and alias the platform module.
Example fix
// before (pulls in native bindings, fails on unsupported OS)
import { ChromaClient } from "chromadb"; // transitively loads src/bindings.ts on import of embedded entry
// after (client-server mode, no native bindings needed)
import { ChromaClient } from "chromadb";
const client = new ChromaClient({ path: "http://localhost:8000" }); // talk to chroma server over HTTP Defensive patterns
Strategy: validation
Validate before calling
import os from "os";
const SUPPORTED = new Set([
"darwin:arm64", "darwin:x64",
"linux:arm64", "linux:x64",
"win32:arm64",
]);
const key = `${os.platform()}:${os.arch()}`;
if (!SUPPORTED.has(key)) {
throw new Error(`Embedded chromadb unsupported on ${key}; use client-server mode instead`);
}
await import("chromadb"); Type guard
const isSupportedPlatform = (): boolean => ["darwin", "linux", "win32"].includes(os.platform()) && !(os.platform() === "win32" && os.arch() !== "arm64");
Prevention
- Pin CI/test images to macOS, Linux x64/arm64, or Windows ARM64 when the embedded runtime is required.
- Prefer client-server mode (ChromaClient + chroma run / Docker) for portability across environments.
- Check os.platform()/os.arch() at startup before importing the embedded entry point.
When it happens
Trigger: Importing or requiring the chromadb package (or anything that transitively pulls in src/bindings.ts) on a Node.js runtime whose os.platform() is not darwin, linux, or win32. Examples: FreeBSD/OpenBSD jails, Alpine on unusual kernels is fine (linux) but SmartOS/AIX/Android Termux (platform 'android') are not.
Common situations: Running Node inside a BSD container, a Termux/Android environment, or a niche CI image; importing the full chromadb package (rather than the client-only entry) in an environment the prebuilt binaries were never published for.
Related errors
- Unsupported architecture on macOS: ${process.arch}
- Unsupported architecture on Linux: ${process.arch}
- Unsupported Windows architecture: ${process.arch}. Only ARM6
- Unsupported platform: ${process.platform}
- Indexing status is not implemented for SegmentAPI
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/4813328efa2422d5.
Report an issue: GitHub.