FuelLabs/fuels-ts · error · Error

Unsupported arch ${process.arch}

Error message

Unsupported arch ${process.arch}

What it means

Thrown by `getPkgPlatform()` in the forc installer after the platform check passes but `process.arch` is neither `arm64` nor `x64`. The published forc binaries only cover Apple Silicon / ARM Linux and x86-64.

Source

Thrown at internal/forc/lib/shared.js:46

  'forc-doc',
  'forc-fmt',
  'forc-lsp',
  'forc-migrate',
  'forc-run',
  'forc-submit',
  'forc-tx',
];

export const getPkgPlatform = () => {
  if (process.platform !== 'darwin' && process.platform !== 'linux') {
    throw new Error(
      `Unsupported platform ${process.platform}.${
        process.platform === 'win32' ? ' If you are on Windows, please use WSL.' : ''
      }}`
    );
  }
  if (process.arch !== 'arm64' && process.arch !== 'x64') {
    throw new Error(`Unsupported arch ${process.arch}`);
  }
  return platforms[process.platform][process.arch];
};

export const versionFilePath = join(__dirname, '../VERSION');

export const getCurrentVersion = () => {
  const versionContents = readFileSync(versionFilePath, 'utf8');
  const forcVersion = versionContents.match(/^.+$/m)?.[0] || versionContents;
  return forcVersion;
};

export const setCurrentVersion = (version) => {
  writeFileSync(versionFilePath, version);
};

export const isGitBranch = (versionFileContents) => versionFileContents.indexOf('git:') !== -1;

View on GitHub (pinned to b3f37c91ac)

Solutions

  1. Reinstall Node.js as a 64-bit `x64` or `arm64` build matching your CPU (`node -p process.arch` to confirm).
  2. On a 32-bit ARM board, switch to a 64-bit kernel/userland so `process.arch` reports `arm64`.
  3. If you genuinely need another arch, build forc from source by setting `internal/forc/VERSION` to `git:<branch>` and extend the `platforms` map.

Example fix

// before
$ node -p process.arch
ia32
// after: install 64-bit node, then
$ node -p process.arch
x64
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED_ARCHS = new Set(['arm64', 'x64']);
if (!SUPPORTED_ARCHS.has(process.arch)) {
  throw new Error(`Refusing to install forc on arch ${process.arch}; use an x64 or arm64 Node.js build.`);
}

Prevention

When it happens

Trigger: Running the install on `ia32` (32-bit x86), `armv7l`/`arm` (32-bit ARM, e.g. Raspberry Pi OS 32-bit), `mips`, `riscv64`, or any other non-arm64/non-x64 CPU architecture.

Common situations: Node.js installed as a 32-bit build on a 64-bit host; embedded/IoT Linux boards running 32-bit kernels; emulated CI environments reporting an uncommon arch.

Related errors


AI-assisted analysis of FuelLabs/fuels-ts@b3f37c91ac (2026-08-12). Data as JSON: /api/errors/8e0055e328732a6c. Report an issue: GitHub.