FuelLabs/fuels-ts · error · Error
Unsupported platform ${process.platform}.${process.platform
Error message
Unsupported platform ${process.platform}.${process.platform === 'win32' ? ' If you are on Windows, please use WSL.' : ''} What it means
Thrown by `getPkgPlatform()` in the fuel-core installer when `process.platform` is not `darwin` or `linux`. The fuel-core binaries are published only for macOS and Linux; Windows requires WSL. Identical guard shape to the forc installer.
Source
Thrown at internal/fuel-core/lib/shared.js:33
export const __dirname = dirname(fileURLToPath(import.meta.url));
export const fuelCoreBinDirPath = join(__dirname, '..', 'fuel-core-binaries');
export const binPath = join(fuelCoreBinDirPath, 'fuel-core');
const platforms = {
darwin: {
arm64: 'aarch64-apple-darwin',
x64: 'x86_64-apple-darwin',
},
linux: {
arm64: 'aarch64-unknown-linux-gnu',
x64: 'x86_64-unknown-linux-gnu',
},
};
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 fuelCoreVersion = readFileSync(versionFilePath, 'utf8');
return fuelCoreVersion.trim();
};
View on GitHub (pinned to b3f37c91ac)
Solutions
- On Windows, run the install under WSL2 so `process.platform === 'linux'`.
- On other unsupported OSes, perform the install inside a Linux container.
- Fork path: extend the `platforms` map in `internal/fuel-core/lib/shared.js` and publish your own fuel-core builds.
Example fix
// before (Windows PowerShell) $ pnpm install // throws: Unsupported platform win32. If you are on Windows, please use WSL. // after (WSL) $ wsl -d Ubuntu $ pnpm install
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_PLATFORMS = new Set(['darwin', 'linux']);
if (!SUPPORTED_PLATFORMS.has(process.platform)) {
throw new Error(`Refusing to install fuel-core on ${process.platform}; use WSL on Windows.`);
} Prevention
- Run Windows setup under WSL2 so the platform reads as `linux`.
- Use a Linux/macOS CI image.
- Document the platform requirement in your project README.
When it happens
Trigger: Running the fuel-core postinstall on `win32` (native Windows), `freebsd`, `sunos`, `aix`, etc. The Windows case appends a WSL hint.
Common situations: Native Windows development without WSL; Windows-based CI images; niche UNIX environments without published fuel-core binaries.
Related errors
- Unsupported platform ${process.platform}.${process.platform
- Unsupported arch ${process.arch}
- Unsupported arch ${process.arch}
- Version '${fuelCoreVersion}' not found\n at ${pkgUrl}
- BIN_FILE_NOT_FOUND
AI-assisted analysis of FuelLabs/fuels-ts@b3f37c91ac (2026-08-12).
Data as JSON: /api/errors/a354ad382f64a835.
Report an issue: GitHub.