dmtrKovalenko/fff · error · Error

No npm package available for platform

Error message

No npm package available for platform: ${triple}

What it means

getNpmPackageName() in fff-node resolves the current triple and indexes TRIPLE_TO_NPM_PACKAGE; if the triple is valid but no @ff-labs/fff-bin-* package exists for it, it throws. This runs during binary download/install and platform resolution.

Solutions

  1. Move to a published target (darwin x64/arm64, linux gnu/musl x64/arm64, win32 x64/arm64).
  2. Build from source with `cargo build --release -p fff-c` to bypass npm binary packages.
  3. Verify the platform package exists on your registry/mirror.
Defensive patterns

Strategy: try-catch

Validate before calling

import { getTriple } from 'fff-node/platform';
// verify triple maps to a real package before download step
console.assert(!!getNpmPackageNameSafe(), 'no package for ' + getTriple());

Try / catch

try {
  installPlatformPackage(getNpmPackageName());
} catch (e) {
  if (String(e.message).startsWith('No npm package available')) {
    execSync('cargo build --release -p fff-c', { stdio: 'inherit' });
  } else throw e;
}

Prevention

When it happens

Trigger: Running the downloader on a triple without a published package: x86_64-android, armv7 android, windows-arm64 when that artifact is unpublished, or linux triples not in the gnu/musl x64/arm64 set.

Common situations: Android emulators (x86_64), 32-bit ARM SBCs, private registries lacking the platform artifacts, or CI targeting architectures the project does not release.

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/0aa61e77f33e0c73. Report an issue: GitHub.

Appendix: source

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

  "aarch64-unknown-linux-gnu": "@ff-labs/fff-bin-linux-arm64-gnu",
  "x86_64-unknown-linux-musl": "@ff-labs/fff-bin-linux-x64-musl",
  "aarch64-unknown-linux-musl": "@ff-labs/fff-bin-linux-arm64-musl",
  "x86_64-pc-windows-msvc": "@ff-labs/fff-bin-win32-x64",
  "aarch64-pc-windows-msvc": "@ff-labs/fff-bin-win32-arm64",
  "aarch64-linux-android": "@ff-labs/fff-bin-android-arm64",
};

/**
 * Get the npm package name for the current platform's native binary.
 *
 * @returns Package name like "@ff-labs/fff-bin-darwin-arm64"
 * @throws If the current platform is not supported
 */
export function getNpmPackageName(): string {
  const triple = getTriple();
  const packageName = TRIPLE_TO_NPM_PACKAGE[triple];
  if (!packageName) {
    throw new Error(`No npm package available for platform: ${triple}`);
  }
  return packageName;
}

View on GitHub (pinned to 7f8537e70f)