{"record":{"id":"a354ad382f64a835","repo":"FuelLabs/fuels-ts","slug":"unsupported-platform-process-platform-process-a354ad","errorCode":null,"errorMessage":"Unsupported platform ${process.platform}.${process.platform === 'win32' ? ' If you are on Windows, please use WSL.' : ''}","messagePattern":"Unsupported platform (.+?)\\.(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"internal/fuel-core/lib/shared.js","lineNumber":33,"sourceCode":"export const __dirname = dirname(fileURLToPath(import.meta.url));\n\nexport const fuelCoreBinDirPath = join(__dirname, '..', 'fuel-core-binaries');\nexport const binPath = join(fuelCoreBinDirPath, 'fuel-core');\n\nconst platforms = {\n  darwin: {\n    arm64: 'aarch64-apple-darwin',\n    x64: 'x86_64-apple-darwin',\n  },\n  linux: {\n    arm64: 'aarch64-unknown-linux-gnu',\n    x64: 'x86_64-unknown-linux-gnu',\n  },\n};\n\nexport const getPkgPlatform = () => {\n  if (process.platform !== 'darwin' && process.platform !== 'linux') {\n    throw new Error(\n      `Unsupported platform ${process.platform}.${\n        process.platform === 'win32' ? ' If you are on Windows, please use WSL.' : ''\n      }`\n    );\n  }\n  if (process.arch !== 'arm64' && process.arch !== 'x64') {\n    throw new Error(`Unsupported arch ${process.arch}`);\n  }\n  return platforms[process.platform][process.arch];\n};\n\nexport const versionFilePath = join(__dirname, '../VERSION');\n\nexport const getCurrentVersion = () => {\n  const fuelCoreVersion = readFileSync(versionFilePath, 'utf8');\n  return fuelCoreVersion.trim();\n};\n","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/FuelLabs/fuels-ts/blob/b3f37c91aca4aa9d5e4c0d3967f66237190826ea/internal/fuel-core/lib/shared.js#L15-L51","documentation":"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.","triggerScenarios":"Running the fuel-core postinstall on `win32` (native Windows), `freebsd`, `sunos`, `aix`, etc. The Windows case appends a WSL hint.","commonSituations":"Native Windows development without WSL; Windows-based CI images; niche UNIX environments without published fuel-core binaries.","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."],"exampleFix":"// before (Windows PowerShell)\n$ pnpm install\n// throws: Unsupported platform win32. If you are on Windows, please use WSL.\n\n// after (WSL)\n$ wsl -d Ubuntu\n$ pnpm install","handlingStrategy":"validation","validationCode":"const SUPPORTED_PLATFORMS = new Set(['darwin', 'linux']);\nif (!SUPPORTED_PLATFORMS.has(process.platform)) {\n  throw new Error(`Refusing to install fuel-core on ${process.platform}; use WSL on Windows.`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["install","fuel-core","platform","windows","wsl","environment"],"backgroundTag":null,"analyzedSha":"b3f37c91aca4aa9d5e4c0d3967f66237190826ea","analyzedAt":"2026-08-12T20:30:56.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}