Trying to npm install -g @anthropic-ai/claude-code on an AMD Ryzen based system
I have tried this on windows 11 powershell and also WSL2 / Ubunut.
I have an AMD Ryzen based Windows 11 environment and when I try to:
npm install -g @anthropic-ai/claude-code
I get the following error:
npm error code EBADPLATFORM npm error notsup Unsupported platform for @anthropic-ai/[email protected]: wanted {"os":"!win32"} (current: {"os":"win32"}) npm error notsup Valid os: !win32 npm error notsup Actual os: win32 npm error A complete log of this run can be found in: C:\Users\david\AppData\Local\npm-cache_logs\2025-02-26T09_14_00_720Z-debug-0.log
Getting Same error
I also encountered this error. Try following these steps:
After shutdown
x@XXX:/mnt/c$ npm install -g @anthropic-ai/claude-code
npm error code EBADPLATFORM
npm error notsup Unsupported platform for @anthropic-ai/[email protected]: wanted {"os":"!win32"} (current: {"os":"win32"})
npm error notsup Valid os: !win32
npm error notsup Actual os: win32
OK .
x@XXX:/mnt/c$ exit
logout
PS C:\Users\XXX> wsl --shutdown
PS C:\Users\XXX> wsl --version
WSL version: 2.4.11.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5716
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.3323
PS C:\Users\XXX> wsl -d Ubuntu
x@XXX:/mnt/c/Users/XXX$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.2 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
x@XXX:/mnt/c/Users/XXX$sudo npm install -g @anthropic-ai/claude-code
added 3 packages in 8s
2 packages are looking for funding
run `npm fund` for details
install success 👯
Having the same issue here:
PS ...> wsl --shutdown
PS ...> wsl --version
WSL version: 2.4.11.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5716
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.3194
PS ...> wsl -d Ubuntu
gdesidera@...$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
gdesidera@...$ npm install -g @anthropic-ai/claude-code
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for @anthropic-ai/[email protected]: wanted {"os":"!win32"} (current: {"os":"win32"})
npm ERR! notsup Valid os: !win32
npm ERR! notsup Actual os: win32
npm ERR! A complete log of this run can be found in: C:\Users\gabri\AppData\Local\npm-cache\_logs\2025-02-26T19_54_00_123Z-debug-0.log
I'm using Windows 11 My CPU is an AMD Ryzen 5 5500
Having the same issue here:
PS ...> wsl --shutdown PS ...> wsl --version WSL version: 2.4.11.0 Kernel version: 5.15.167.4-1 WSLg version: 1.0.65 MSRDC version: 1.2.5716 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.26100.3194 PS ...> wsl -d Ubuntu gdesidera@...$ cat /etc/os-release PRETTY_NAME="Ubuntu 22.04.3 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.3 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy gdesidera@...$ npm install -g @anthropic-ai/claude-code npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for @anthropic-ai/[email protected]: wanted {"os":"!win32"} (current: {"os":"win32"}) npm ERR! notsup Valid os: !win32 npm ERR! notsup Actual os: win32 npm ERR! A complete log of this run can be found in: C:\Users\gabri\AppData\Local\npm-cache\_logs\2025-02-26T19_54_00_123Z-debug-0.logI'm using Windows 11 My CPU is an AMD Ryzen 5 5500
solution here https://github.com/anthropics/claude-code/issues/113#issuecomment-2685686286
The newest version (v0.2.18) has improved instructions for WSL usage. Closing this out -- feel free to open a new issue if you get stuck.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.