[{"data":1,"prerenderedAt":457},["ShallowReactive",2],{"content-/claude-code-version-troubleshooting":3,"all-pages-for-dir":455,"og-image-/claude-code-version-troubleshooting":456},{"id":4,"title":5,"body":6,"category":438,"description":439,"extension":440,"meta":441,"navigation":442,"ogImage":438,"path":443,"project_name":438,"published":444,"publishedAt":445,"seo":446,"stem":447,"tags":448,"todo":438,"unpublished":444,"updatedAt":445,"__hash__":454},"pages/2025-12/2025-12-01/claude-code-version-troubleshooting.md","Claude Code バージョン管理トラブルシューティング",{"type":7,"value":8,"toc":415},"minimark",[9,13,18,25,42,45,54,68,71,74,77,81,100,103,108,111,119,122,125,128,137,140,146,149,152,161,163,169,172,175,184,186,192,195,198,202,205,213,215,223,226,231,239,244,249,253,268,272,283,287,295,298,301,309,316,320,392,395,398,411],[10,11,5],"h1",{"id":12},"claude-code-バージョン管理トラブルシューティング",[14,15,17],"h2",{"id":16},"結論やるべきこと","結論：やるべきこと",[19,20,21],"p",{},[22,23,24],"strong",{},"Volta環境でClaude Codeをアップデートする場合は、以下のコマンドを使う：",[26,27,32],"pre",{"className":28,"code":29,"language":30,"meta":31,"style":31},"language-powershell shiki shiki-themes vitesse-light vitesse-light","volta install @anthropic-ai/claude-code\n","powershell","",[33,34,35],"code",{"__ignoreMap":31},[36,37,40],"span",{"class":38,"line":39},"line",1,[36,41,29],{},[19,43,44],{},"確認：",[26,46,48],{"className":28,"code":47,"language":30,"meta":31,"style":31},"claude --version\n",[33,49,50],{"__ignoreMap":31},[36,51,52],{"class":38,"line":39},[36,53,47],{},[55,56,57],"blockquote",{},[19,58,59,60,63,64,67],{},"⚠️ ",[33,61,62],{},"npm update -g"," やVS Code拡張の更新だけでは、CLIのバージョンは更新されない。必ず ",[33,65,66],{},"volta install"," を実行すること。",[69,70],"hr",{},[14,72,73],{"id":73},"問題の概要",[19,75,76],{},"VS Code拡張版のClaude Codeを使用しており、アップデートしたつもりになっていたが、実際には古いバージョン（2.0.0）のまま使われ続けていた。",[78,79,80],"h3",{"id":80},"症状",[82,83,84,91,94],"ul",{},[85,86,87,90],"li",{},[33,88,89],{},"claude --version"," → 2.0.0 と表示される",[85,92,93],{},"VS Code拡張のバージョン → 2.0.55（最新）",[85,95,96,99],{},[33,97,98],{},"/plugin"," コマンドが使えない（プラグインシステムは2.0.0には未実装）",[14,101,102],{"id":102},"原因",[19,104,105],{},[22,106,107],{},"Volta経由でClaude Codeがインストールされており、Voltaのshimが古いバージョンを参照していた。",[78,109,110],{"id":110},"環境の構成",[26,112,117],{"className":113,"code":115,"language":116},[114],"language-text","C:\\Users\\\u003Cユーザー名>\\AppData\\Local\\Volta\\\n├── bin\\\n│   └── claude.exe  ← これが実際に呼ばれるshim（古い2.0.0を参照）\n└── tools\\\n    └── image\\\n        └── node\\22.17.0\\  ← npmグローバルもここに入る\n","text",[33,118,115],{"__ignoreMap":31},[19,120,121],{},"重要な点：npmグローバル自体がVoltaの管理下にあるため、Voltaを使っている限り、すべてのグローバルパッケージはVolta経由で管理される。",[14,123,124],{"id":124},"確認コマンド",[78,126,127],{"id":127},"使用中のclaudeコマンドの場所を確認",[26,129,131],{"className":28,"code":130,"language":30,"meta":31,"style":31},"Get-Command claude | Format-List *\n",[33,132,133],{"__ignoreMap":31},[36,134,135],{"class":38,"line":39},[36,136,130],{},[19,138,139],{},"出力例：",[26,141,144],{"className":142,"code":143,"language":116},[114],"Path   : C:\\Users\\numbe\\AppData\\Local\\Volta\\bin\\claude.exe\nSource : C:\\Users\\numbe\\AppData\\Local\\Volta\\bin\\claude.exe\n",[33,145,143],{"__ignoreMap":31},[19,147,148],{},"→ Volta経由で呼ばれていることがわかる",[78,150,151],{"id":151},"npmにインストールされているバージョンを確認",[26,153,155],{"className":28,"code":154,"language":30,"meta":31,"style":31},"npm list -g @anthropic-ai/claude-code\n",[33,156,157],{"__ignoreMap":31},[36,158,159],{"class":38,"line":39},[36,160,154],{},[19,162,139],{},[26,164,167],{"className":165,"code":166,"language":116},[114],"C:\\Users\\numbe\\AppData\\Local\\Volta\\tools\\image\\node\\22.17.0\n└── @anthropic-ai/claude-code@2.0.55\n",[33,168,166],{"__ignoreMap":31},[19,170,171],{},"→ npm自体には最新版が入っているが、shimが古いため使われていない",[78,173,174],{"id":174},"npmグローバルのインストール先を確認",[26,176,178],{"className":28,"code":177,"language":30,"meta":31,"style":31},"npm config get prefix\n",[33,179,180],{"__ignoreMap":31},[36,181,182],{"class":38,"line":39},[36,183,177],{},[19,185,139],{},[26,187,190],{"className":188,"code":189,"language":116},[114],"C:\\Users\\numbe\\AppData\\Local\\Volta\\tools\\image\\node\\22.17.0\n",[33,191,189],{"__ignoreMap":31},[19,193,194],{},"→ npmグローバルがVolta内にあることがわかる",[14,196,197],{"id":197},"解決策",[78,199,201],{"id":200},"選択肢a-voltaを使い続ける推奨簡単","選択肢A: Voltaを使い続ける（推奨・簡単）",[19,203,204],{},"Voltaで再インストールしてshimを更新する：",[26,206,207],{"className":28,"code":29,"language":30,"meta":31,"style":31},[33,208,209],{"__ignoreMap":31},[36,210,211],{"class":38,"line":39},[36,212,29],{},[19,214,44],{},[26,216,217],{"className":28,"code":47,"language":30,"meta":31,"style":31},[33,218,219],{"__ignoreMap":31},[36,220,221],{"class":38,"line":39},[36,222,47],{},[19,224,225],{},"→ 2.0.55（または最新版）になっていればOK",[19,227,228],{},[22,229,230],{},"メリット:",[82,232,233,236],{},[85,234,235],{},"簡単（1コマンドで完了）",[85,237,238],{},"Node.jsのバージョン管理はそのまま使える",[19,240,241],{},[22,242,243],{},"デメリット:",[82,245,246],{},[85,247,248],{},"今後もアップデート時にVolta経由を意識する必要がある",[78,250,252],{"id":251},"選択肢b-voltaを完全にやめる大変","選択肢B: Voltaを完全にやめる（大変）",[254,255,256,259,262,265],"ol",{},[85,257,258],{},"Voltaをアンインストール",[85,260,261],{},"Node.jsを直接インストールし直す",[85,263,264],{},"環境変数PATHの整理",[85,266,267],{},"npmグローバルパッケージを再インストール",[19,269,270],{},[22,271,230],{},[82,273,274,277],{},[85,275,276],{},"シンプルな構成になる",[85,278,279,282],{},[33,280,281],{},"npm install -g"," で素直にアップデートできる",[19,284,285],{},[22,286,243],{},[82,288,289,292],{},[85,290,291],{},"作業が多い",[85,293,294],{},"プロジェクトごとのNode.jsバージョン管理ができなくなる",[14,296,297],{"id":297},"今後の運用",[19,299,300],{},"Voltaを使い続ける場合、Claude Codeのアップデートは以下のコマンドで行う：",[26,302,303],{"className":28,"code":29,"language":30,"meta":31,"style":31},[33,304,305],{"__ignoreMap":31},[36,306,307],{"class":38,"line":39},[36,308,29],{},[19,310,311,312,315],{},"VS Code拡張のアップデートとは",[22,313,314],{},"別に","このコマンドを実行する必要がある点に注意。",[14,317,319],{"id":318},"参考vs-code拡張版とcli版の関係","参考：VS Code拡張版とCLI版の関係",[321,322,323,339],"table",{},[324,325,326],"thead",{},[327,328,329,333,336],"tr",{},[330,331,332],"th",{},"項目",[330,334,335],{},"VS Code拡張版",[330,337,338],{},"CLI版（npm/Volta）",[340,341,342,354,366,381],"tbody",{},[327,343,344,348,351],{},[345,346,347],"td",{},"インストール場所",[345,349,350],{},"VS Code内",[345,352,353],{},"npmグローバル",[327,355,356,359,362],{},[345,357,358],{},"バージョン確認",[345,360,361],{},"拡張機能の詳細",[345,363,364],{},[33,365,89],{},[327,367,368,371,374],{},[345,369,370],{},"アップデート",[345,372,373],{},"VS Codeの拡張更新",[345,375,376,378,379],{},[33,377,66],{}," or ",[33,380,62],{},[327,382,383,386,389],{},[345,384,385],{},"用途",[345,387,388],{},"VS Code内での使用",[345,390,391],{},"ターミナルから直接使用",[19,393,394],{},"両方入れることも可能だが、混乱を避けるためどちらかに統一した方が良い。",[14,396,397],{"id":397},"教訓",[254,399,400,405,408],{},[85,401,402,404],{},[33,403,89],{}," で実際に使われているバージョンを確認する習慣をつける",[85,406,407],{},"Voltaを使っている場合、npmグローバルパッケージもVolta経由で管理されることを意識する",[85,409,410],{},"アップデートしたつもりでも、shimが更新されていない可能性がある",[412,413,414],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":31,"searchDepth":416,"depth":416,"links":417},2,[418,419,423,426,431,435,436,437],{"id":16,"depth":416,"text":17},{"id":73,"depth":416,"text":73,"children":420},[421],{"id":80,"depth":422,"text":80},3,{"id":102,"depth":416,"text":102,"children":424},[425],{"id":110,"depth":422,"text":110},{"id":124,"depth":416,"text":124,"children":427},[428,429,430],{"id":127,"depth":422,"text":127},{"id":151,"depth":422,"text":151},{"id":174,"depth":422,"text":174},{"id":197,"depth":416,"text":197,"children":432},[433,434],{"id":200,"depth":422,"text":201},{"id":251,"depth":422,"text":252},{"id":297,"depth":416,"text":297},{"id":318,"depth":416,"text":319},{"id":397,"depth":416,"text":397},null,"Volta経由でインストールされたClaude Codeが古いバージョンのままになっていた問題の原因と解決方法","md",{},true,"/claude-code-version-troubleshooting",false,"2025-12-01T00:00:00.000Z",{"title":5,"description":439},"2025-12/2025-12-01/claude-code-version-troubleshooting",[449,450,451,452,453],"claude-code","troubleshooting","volta","nodejs","version-management","aDaRpWmxV_vjxrhyybVd6s4ekRophCrKNTiXTTA5O10",[],"https://log.eurekapu.com/og/blog/claude-code-version-troubleshooting.png?v=2025-12-01T00%3A00%3A00.000Z&title=Claude%20Code%20%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E7%AE%A1%E7%90%86%E3%83%88%E3%83%A9%E3%83%96%E3%83%AB%E3%82%B7%E3%83%A5%E3%83%BC%E3%83%86%E3%82%A3%E3%83%B3%E3%82%B0&author=Kei%20Komatsu&sig=8effffe7f62ead55",1782528761890]