{"record":{"id":"beb2ba5b57564642","repo":"chroma-core/chroma","slug":"unsupported-platform-process-platform","errorCode":null,"errorMessage":"Unsupported platform: ${process.platform}","messagePattern":"Unsupported platform: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"clients/js/packages/chromadb/src/bindings.ts","lineNumber":31,"sourceCode":"  }\n} else if (process.platform === \"linux\") {\n  if (process.arch === \"arm64\") {\n    binding = require(\"chromadb-js-bindings-linux-arm64-gnu\");\n  } else if (process.arch === \"x64\") {\n    binding = require(\"chromadb-js-bindings-linux-x64-gnu\");\n  } else {\n    throw new Error(`Unsupported architecture on Linux: ${process.arch}`);\n  }\n} else if (process.platform === \"win32\") {\n  if (process.arch === \"arm64\") {\n    binding = require(\"chromadb-js-bindings-win32-arm64-msvc\");\n  } else {\n    throw new Error(\n      `Unsupported Windows architecture: ${process.arch}. Only ARM64 is supported.`,\n    );\n  }\n} else {\n  throw new Error(`Unsupported platform: ${process.platform}`);\n}\n\nexport default binding;\n","sourceCodeStart":13,"sourceCodeEnd":35,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/clients/js/packages/chromadb/src/bindings.ts#L13-L35","documentation":"Thrown at module load time by the chromadb package's bindings loader when process.platform is not darwin, linux, or win32. No prebuilt native binding exists for any other operating system, so the import of the native-bindings flavor of chromadb fails immediately on unsupported platforms.","triggerScenarios":"import \"chromadb\" on freebsd, openbsd, sunos, aix, or android Node builds; unusual runtimes that report non-standard process.platform values.","commonSituations":"Deploying to BSD-based servers or NAS devices; edge runtimes that emulate Node partially; very rare in typical web app deployments.","solutions":["Switch to the pure-JS client packages (chromadb-core / chromadb-cloud) that talk HTTP to a Chroma server and need no native binding.","Run the workload inside a Linux container/VM on the target host."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const knownPlatforms = new Set([\"darwin\", \"linux\", \"win32\"]);\nif (!knownPlatforms.has(process.platform)) {\n  // route to the pure-JS HTTP client instead of the native package\n  const { ChromaClient } = await import(\"chromadb-core\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Gate the native import behind an allowlist of process.platform values.","Run unusual-OS workloads in Linux containers.","Smoke-test imports on every target OS in CI before shipping."],"tags":["native-bindings","platform","module-load"],"backgroundTag":"unsupported-platform-architecture","analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}