vercel/next.js · error · Error

Unsupported platform: ${platform}

Error message

Unsupported platform: ${platform}

What it means

Platform matrix gap in getBinaryName: process.platform is not win32, darwin, or linux, so no prebuilt mkcert binary name exists for it. The self-signed certificate feature for next dev --https cannot download a matching binary on this OS.

Source

Thrown at packages/next/src/lib/mkcert.ts:32

  cert: string
  rootCA?: string
}

function getBinaryName() {
  const platform = process.platform
  const arch = process.arch === 'x64' ? 'amd64' : process.arch

  if (platform === 'win32') {
    return `mkcert-${MKCERT_VERSION}-windows-${arch}.exe`
  }
  if (platform === 'darwin') {
    return `mkcert-${MKCERT_VERSION}-darwin-${arch}`
  }
  if (platform === 'linux') {
    return `mkcert-${MKCERT_VERSION}-linux-${arch}`
  }

  throw new Error(`Unsupported platform: ${platform}`)
}

async function downloadBinary() {
  try {
    const binaryName = getBinaryName()
    const cacheDirectory = getCacheDirectory('mkcert')
    const binaryPath = path.join(cacheDirectory, binaryName)

    if (fs.existsSync(binaryPath)) {
      return binaryPath
    }

    const downloadUrl = `https://github.com/FiloSottile/mkcert/releases/download/${MKCERT_VERSION}/${binaryName}`

    await fs.promises.mkdir(cacheDirectory, { recursive: true })

    Log.info(`Downloading mkcert package...`)

View on GitHub (pinned to 0eb3775416)

Solutions

  1. Run on a supported platform (macOS, Linux, Windows) or provide your own certificates instead of the built-in mkcert flow.
Defensive patterns

Strategy: validation

When it happens

Trigger: mkcert helper is run on an unsupported OS platform.

Common situations: Using the experimental HTTPS dev server on a platform with no prebuilt mkcert binary.


AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19). Data as JSON: /api/errors/fe5bacbaca57e166. Report an issue: GitHub.