dmtrKovalenko/fff · error · Error

Unsupported architecture

Error message

Unsupported architecture: ${arch}

What it means

fff-node's normalizeArch() maps process.arch to a Rust target arch and accepts only x64/amd64, arm64, and arm. Other process.arch values abort triple construction, blocking library-path and npm-package resolution.

Solutions

  1. Use a supported architecture (x86_64, aarch64, or arm).
  2. Install the 64-bit x64 or arm64 Node build instead of ia32 on 64-bit hardware.
  3. Build the native library from source for exotic arches and place it where findBinary() looks.
  4. Fix test mocks to set process.arch to 'x64' or 'arm64'.
Defensive patterns

Strategy: validation

Validate before calling

if (!['x64','amd64','arm64','arm'].includes(process.arch)) throw new Error(`unsupported arch ${process.arch}`);

Prevention

When it happens

Trigger: Calling getTriple() on machines where process.arch is ia32, mips/mipsel, ppc64, s390x, riscv64, or loong64, or with a bogus mocked arch in tests.

Common situations: 32-bit Node installs, s390x/ppc64 Linux servers, RISC-V dev boards, qemu-emulated CI runners reporting uncommon arches.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of dmtrKovalenko/fff@7f8537e70f (2026-09-10). Data as JSON: /api/errors/cce474ec5d9edf81. Report an issue: GitHub.

Appendix: source

Thrown at packages/fff-node/src/platform.ts:66

    return "unknown-linux-musl";
  }
  return "unknown-linux-gnu";
}

/**
 * Normalize architecture name to Rust target format
 */
function normalizeArch(arch: string): string {
  switch (arch) {
    case "x64":
    case "amd64":
      return "x86_64";
    case "arm64":
      return "aarch64";
    case "arm":
      return "arm";
    default:
      throw new Error(`Unsupported architecture: ${arch}`);
  }
}

/**
 * Get the library file extension for the current platform
 */
export function getLibExtension(): "dylib" | "so" | "dll" {
  switch (process.platform) {
    case "darwin":
      return "dylib";
    case "win32":
      return "dll";
    default:
      return "so";
  }
}

/**

View on GitHub (pinned to 7f8537e70f)