diff --git a/.changeset/tired-jobs-find.md b/.changeset/tired-jobs-find.md new file mode 100644 index 0000000..eabb9ac --- /dev/null +++ b/.changeset/tired-jobs-find.md @@ -0,0 +1,16 @@ +--- +'@offckb/cli': patch +--- + +fix(install): force x86_64 architecture on Windows + +CKB only provides x86_64 binaries for Windows, not aarch64. +When Windows ARM devices reported 'arm64' via os.arch(), the code +tried to download a non-existent 'aarch64-pc-windows-msvc' binary, +resulting in a 404 error. + +This fix forces all Windows systems to use x86_64, which: + +- Works correctly on Windows x64 +- Works via emulation on Windows ARM devices +- Matches the only Windows binary CKB provides diff --git a/src/node/install.ts b/src/node/install.ts index 7319436..e681d9f 100644 --- a/src/node/install.ts +++ b/src/node/install.ts @@ -143,6 +143,12 @@ function getOS(): string { } function getArch(): string { + // CKB only provides x86_64 binaries for Windows + // Return x86_64 for all Windows systems (works on ARM via emulation) + if (os.platform() === 'win32') { + return 'x86_64'; + } + const arch = os.arch(); if (arch === 'x64') { return 'x86_64';