{"record":{"id":"1a88029bdcf7440d","repo":"FuelLabs/fuels-ts","slug":"version-forcversion-not-found-n-at-pkgur","errorCode":null,"errorMessage":"Version '${forcVersion}' not found\\n    at ${pkgUrl}","messagePattern":"Version '(.+?)' not found\\\\n    at (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"internal/forc/lib/install.js","lineNumber":62,"sourceCode":"    const binVersion = readFileSync(binVersionPath, 'utf8').trim();\n    versionMatches = binVersion === forcVersion;\n    info({\n      expected: forcVersion,\n      received: binVersion,\n      isGitBranch: isGitBranch(forcVersion),\n    });\n  }\n\n  if (versionMatches) {\n    info(`Forc binary already installed, skipping.`);\n  } else {\n    const stdioOpts = { stdio: 'inherit' };\n\n    // Otherwise, download\n    const buf = await fetch(pkgUrl).then((r) => r.buffer());\n\n    if (/not found/i.test(buf.toString())) {\n      throw new Error(`Version '${forcVersion}' not found\\n    at ${pkgUrl}`);\n    }\n\n    writeFileSync(pkgPath, buf);\n\n    // Extract\n    execSync(`tar xzf \"${pkgPath}\" -C \"${rootDir}\"`, stdioOpts);\n    cpSync(versionFilePath, binVersionPath);\n\n    // Cleanup\n    rmSync(pkgPath);\n  }\n})().catch((e) => error(e));\n","sourceCodeStart":44,"sourceCodeEnd":75,"githubUrl":"https://github.com/FuelLabs/fuels-ts/blob/b3f37c91aca4aa9d5e4c0d3967f66237190826ea/internal/forc/lib/install.js#L44-L75","documentation":"Thrown by the forc binary install script when the downloaded body from the GitHub release URL (`https://github.com/FuelLabs/sway/releases/download/v<version>/...`) contains the text 'not found', which is how GitHub responds to a 404 for a missing release asset. The `forcVersion` is read from `internal/forc/VERSION`. This runs during the package's postinstall step, so it blocks local setup of the forc toolchain.","triggerScenarios":"The `internal/forc/VERSION` file points at a sway release tag that has no published binary asset for the current platform (e.g. `darwin_arm64`); a downstream fork pinned a version that FuelLabs never released; a corporate proxy/mirror serves an HTML 'not found' page in place of the tarball.","commonSituations":"Upgrading fuels to a commit whose VERSION references an unreleased forc; running on linux_arm64 when that asset was not uploaded for the tag; a transient GitHub outage returning a 404 HTML body that matches `/not found/i`.","solutions":["Open `internal/forc/VERSION`, read the pinned version, and confirm a matching `forc-binaries-<platform>.tar.gz` asset exists at `https://github.com/FuelLabs/sway/releases/tag/v<version>`.","Bump or downgrade fuels to a release whose pinned forc version has assets for your platform.","Replace the VERSION contents with a `git:<branch>` string to build forc from source instead of downloading (see `isGitBranch` / `buildFromGitBranch` in shared.js).","If behind a proxy, unset it or point `npm_config_https_proxy` at one that can reach GitHub raw release assets."],"exampleFix":"// before: internal/forc/VERSION\n0.66.3\n// after: pin to a tag that has the asset for your platform, OR build from source\ngit:master","handlingStrategy":"validation","validationCode":"// before triggering the install, verify the release asset exists\nimport { getCurrentVersion, getPkgPlatform } from './shared.js';\nconst version = getCurrentVersion().trim();\nconst platform = getPkgPlatform(); // throws early if unsupported\nconst url = `https://github.com/FuelLabs/sway/releases/download/v${version}/forc-binaries-${platform}.tar.gz`;\nconst ok = await fetch(url, { method: 'HEAD' }).then((r) => r.status === 200);\nif (!ok) throw new Error(`Forc ${version} asset not found at ${url}`);","typeGuard":null,"tryCatchPattern":"try {\n  // run the installer\n} catch (e) {\n  if (/Version '.*' not found/.test(e.message)) {\n    console.error('Pinned forc version has no GitHub release asset for this platform. Edit internal/forc/VERSION or build from source via git:<branch>.');\n  }\n  throw e;\n}","preventionTips":["Pin `internal/forc/VERSION` only to sway tags that publish assets for all of linux/darwin × arm64/x64.","In CI, add a pre-check that HEADs the release URL before running install.","Use `git:<branch>` in VERSION to skip the download path entirely when iterating."],"tags":["install","forc","toolchain","network","version-mismatch"],"backgroundTag":null,"analyzedSha":"b3f37c91aca4aa9d5e4c0d3967f66237190826ea","analyzedAt":"2026-08-12T20:30:56.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}