Claude Code 공식 문서에 따르면:

현재 Claude Code는 Windows에서 직접 실행되지 않으며 WSL이 필요합니다.

…라고 하고 있지만, Git for Windows가 깔려 있을 경우, Git Bash 안에서는 문제 없이 사용 가능하다. 다만, npm으로 설치할 때 scripts/preinstall.js 스크립트에서 Windows인지 검사하는 부분이 있어서 오류가 나며 설치가 중단되는데, 해당 스크립트는 오로지 Windows인지 검사하는 역할만 하고 있기 때문에[1] 아래와 같이 npm이 해당 스크립트를 실행하지 않도록 우회해도 설치에 문제가 없다:

NPM_CONFIG_IGNORE_SCRIPTS=true npm install -g @anthropic-ai/claude-code

다만 명령 프롬프트나 PowerShell에서 Claude Code를 실행시키려 할 경우 SHELL 환경 변수가 정의되어 있지 않기 때문에 오류가 난다. 그래서 Git Bash 안에서 Claude Code를 실행해야 한다.

일단 이렇게 설치해서 조금 써 본 결과 크게 문제는 없는 걸로 보인다.


  1. 해당 스크립트는 아래 코드가 전부다:

    /**
     * Preinstall script to check for Windows environment and exit gracefully 
     * with an informative message if detected.
     */
    
    // Check if running on Windows
    if (process.platform === 'win32') {
      console.error('\x1b[31m%s\x1b[0m', 'Error: Claude Code is not supported on Windows.');
      console.error('\x1b[33m%s\x1b[0m', 'Claude Code requires macOS or Linux to run properly.');
      console.error('\x1b[33m%s\x1b[0m', 'If you are using WSL (Windows Subsystem for Linux):');
      console.error('\x1b[33m%s\x1b[0m', '  1. Make sure you are running npm install from within the WSL terminal, not from PowerShell or CMD');
      console.error('\x1b[33m%s\x1b[0m', '  2. If you\'re still seeing this message in WSL, your environment may be incorrectly reporting as Windows');
      console.error('\x1b[33m%s\x1b[0m', 'Please visit https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#check-system-requirements for troubleshooting information.');
      process.exit(1);
    }
    ↩︎
7

❤️

6 people reacted.

中年(중년)中小企業(중소기업) 開發者(개발자), 90年代(년대) Console Gamer(콘솔 게이머). 좋은 하루를 繼續(계속)해 나아간다. 좋은 하루가 모이면 좋은 人生(인생)이 된다.

韓国人のプログラマー、40代、小学生の息子とゲームするのが幸せ😃💕龍が如く 、ゼルダの伝説、マリオ、ピクミン好き

「いい1日を続ける」
いい1日を続けていけば、いい人生になる!

Tokyo-based の daisuke です。

洪さんの実装力に感化された一人です。

dai (daisuke) Tokyo-based.

슈티를 함께 만들 팀을 만들고 있습니다. 관심 있으신 분, 또는 잘 모르겠지만 이야기를 나눠보고 싶은 분도 bgl@gwyng.com으로 편하게 연락주세요.

Uncertified Quasi-pseudo dev

A hobbyist photographer, football fan and ex software engineer.

This account is for my personal records. I mostly post in Korean, but I can communicate in English and Japanese.

I use tags for my photo posts.

🎉

1 person reacted.