janhq/jan · error · Error
Unsupported platform: ${platform}
Error message
Unsupported platform: ${platform} What it means
Thrown by getPlatformArch() in scripts/download-bin.mjs when os.platform() returns a value other than 'darwin', 'linux', or 'win32'. The binary-fetch step (bun, uv, sqlite-vec) only ships prebuilt assets for those three OSes, so any other platform aborts the setup rather than downloading a wrong-arch binary.
Source
Thrown at scripts/download-bin.mjs:148
const arch = os.arch() // 'x64', 'arm64', etc.
let bunPlatform, uvPlatform
if (platform === 'darwin') {
bunPlatform = arch === 'arm64' ? 'darwin-aarch64' : 'darwin-x64'
uvPlatform =
arch === 'arm64' ? 'aarch64-apple-darwin' : 'x86_64-apple-darwin'
} else if (platform === 'linux') {
bunPlatform = arch === 'arm64' ? 'linux-aarch64' : 'linux-x64'
uvPlatform =
arch === 'arm64'
? 'aarch64-unknown-linux-gnu'
: 'x86_64-unknown-linux-gnu'
} else if (platform === 'win32') {
bunPlatform = 'windows-x64' // Bun has limited Windows support
uvPlatform = 'x86_64-pc-windows-msvc'
} else {
throw new Error(`Unsupported platform: ${platform}`)
}
return { bunPlatform, uvPlatform }
}
async function main() {
if (process.env.SKIP_BINARIES) {
console.log('Skipping binaries download.')
process.exit(0)
}
console.log('Starting main function')
const platform = os.platform()
const { bunPlatform, uvPlatform } = getPlatformArch()
console.log(`bunPlatform: ${bunPlatform}, uvPlatform: ${uvPlatform}`)
const binDir = 'src-tauri/resources/bin'
const tempBinDir = 'scripts/dist'
const bunPath = `${tempBinDir}/bun-${bunPlatform}.zip`View on GitHub (pinned to fad3f12a14)
Solutions
- Run the setup on a supported platform (macOS, Linux, or Windows).
- Set SKIP_BINARIES=1 to skip the download step if binaries are provided another way.
- Manually place bun/uv binaries in scripts/dist matching the expected naming and bypass the script.
- Extend getPlatformArch to map your platform if you can self-host the prebuilts.
Example fix
// before
const { bunPlatform, uvPlatform } = getPlatformArch()
// after (run)
SKIP_BINARIES=1 node scripts/download-bin.mjs
// or extend the function for your platform (e.g. freebsd) before calling Defensive patterns
Strategy: validation
Validate before calling
import os from 'os'
const SUPPORTED = new Set(['darwin', 'linux', 'win32'])
if (!SUPPORTED.has(os.platform())) {
if (!process.env.SKIP_BINARIES) {
throw new Error(`Set SKIP_BINARIES=1 or run on macOS/Linux/Windows (got ${os.platform()})`)
}
} Prevention
- Run the binary download step only on macOS, Linux, or Windows.
- Set SKIP_BINARIES=1 if you provide binaries another way.
- Gate the script behind a platform check in CI.
When it happens
Trigger: Running `node scripts/download-bin.mjs` on FreeBSD, OpenBSD, SunOS/Solaris, AIX, or Android; running under a Node build that reports an unexpected platform string.
Common situations: Building on an uncommon OS; CI on a minimal container whose os.platform() is unexpected; attempting a native build instead of using the download path.
Related errors
- Platform {platform.system()} not supported
- No supported backend binaries found for this system. Backend
- MLX engine not found
- Extension does not support CUDA runtime installation
AI-assisted analysis of janhq/jan@fad3f12a14 (2026-08-12).
Data as JSON: /api/errors/5b54b9d61ef4b94a.
Report an issue: GitHub.