{"record":{"id":"15d9b02cde3f1a52","repo":"dmtrKovalenko/fff","slug":"no-npm-package-available-for-platform-triple","errorCode":null,"errorMessage":"No npm package available for platform: ${triple}","messagePattern":"No npm package available for platform: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/fff-bun/src/platform.ts","lineNumber":125,"sourceCode":"  \"aarch64-unknown-linux-gnu\": \"@ff-labs/fff-bin-linux-arm64-gnu\",\n  \"x86_64-unknown-linux-musl\": \"@ff-labs/fff-bin-linux-x64-musl\",\n  \"aarch64-unknown-linux-musl\": \"@ff-labs/fff-bin-linux-arm64-musl\",\n  \"x86_64-pc-windows-msvc\": \"@ff-labs/fff-bin-win32-x64\",\n  \"aarch64-pc-windows-msvc\": \"@ff-labs/fff-bin-win32-arm64\",\n  \"aarch64-linux-android\": \"@ff-labs/fff-bin-android-arm64\",\n};\n\n/**\n * Get the npm package name for the current platform's native binary.\n *\n * @returns Package name like \"@ff-labs/fff-bin-darwin-arm64\"\n * @throws If the current platform is not supported\n */\nexport function getNpmPackageName(): string {\n  const triple = getTriple();\n  const packageName = TRIPLE_TO_NPM_PACKAGE[triple];\n  if (!packageName) {\n    throw new Error(`No npm package available for platform: ${triple}`);\n  }\n  return packageName;\n}\n","sourceCodeStart":107,"sourceCodeEnd":129,"githubUrl":"https://github.com/dmtrKovalenko/fff/blob/7f8537e70f0ea1210f9acbbfc4640141105cdc78/packages/fff-bun/src/platform.ts#L107-L129","documentation":"getNpmPackageName() computes the current target triple and looks it up in TRIPLE_TO_NPM_PACKAGE, which only lists the 9 published @ff-labs/fff-bin-* packages. A valid triple with no published package means the install-time downloader cannot know which artifact to fetch, so it throws.","triggerScenarios":"Running the package download/install step on a supported OS/arch combination that has no published binary package — e.g. x86_64-android, arm-linux-android, windows on arm without the win32-arm64 artifact published, or any new triple added to code before its npm package exists.","commonSituations":"Android x86_64 emulators, 32-bit ARM devices, CI matrix entries for targets the project does not publish, or a registry/private mirror where the platform package was not published.","solutions":["Switch to a target with a published package (darwin x64/arm64, linux gnu/musl x64/arm64, win32 x64).","Build the native library from source (`cargo build --release -p fff-c`) and skip npm-based binary resolution.","Check that the expected @ff-labs/fff-bin-* package actually exists on the registry you are using (proxy/verdaccio mirrors may be missing it)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import { getTriple } from 'fff-bun/platform';\nconst KNOWN = ['aarch64-apple-darwin','x86_64-apple-darwin','x86_64-unknown-linux-gnu','aarch64-unknown-linux-gnu','x86_64-unknown-linux-musl','aarch64-unknown-linux-musl','x86_64-pc-windows-msvc','aarch64-pc-windows-msvc','aarch64-linux-android'];\nif (!KNOWN.includes(getTriple())) throw new Error('no published package for this triple');","typeGuard":null,"tryCatchPattern":"try {\n  const pkg = getNpmPackageName();\n} catch (e) {\n  if (String(e.message).startsWith('No npm package available')) {\n    // fall back to building from source\n    execSync('cargo build --release -p fff-c');\n  } else throw e;\n}","preventionTips":["Restrict CI/install matrices to triples with published @ff-labs/fff-bin-* packages.","Pin installs to supported platforms in Dockerfiles and docs.","Fall back to source builds for exotic targets."],"tags":["platform","npm","unsupported-platform","installation"],"backgroundTag":"unsupported-platform","analyzedSha":"7f8537e70f0ea1210f9acbbfc4640141105cdc78","analyzedAt":"2026-09-10T07:26:53.407Z","contentChangedAt":"2026-09-10T07:26:53.407Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}