If you were one of the early vibe coders who installed Claude Code back in 2025 using npm install -g @anthropic-ai/claude-code, that was the only way to do it at the time. As of v2.1.15 (January 21, 2026), Anthropic officially switched to a standalone installer and the npm method is now deprecated. I’ll be honest, I saw the deprecation warnings and ignored them for a while because everything still worked. Then one day I opened iTerm and Claude Code just wouldn’t launch, and that’s when I finally dealt with it.

CHECK IF THIS IS YOUR PROBLEM

Open iTerm (or whatever terminal you use) and run:

claude --version

If you get command not found, you’re in the right place. If you get a version number, you’re fine.

You can also run which claude to double-check how it was installed. If nothing comes back, the binary isn’t in your PATH anymore, and if it points to something inside a node_modules folder, you’re still running the old npm version.

npm VS. A STANDALONE INSTALLER (FOR NON-DEVELOPERS)

This is actually a good real-world example of something you’ll run into as a vibe coder, so it’s worth understanding what happened here beyond just fixing it.

npm (Node Package Manager) is a tool that developers use to install other tools and libraries. When you ran npm install -g @anthropic-ai/claude-code, you were telling npm to go download Claude Code and set it up on your machine. The problem is that npm comes with strings attached. It needs Node.js installed to work, it won’t update things on its own, and it shares space with every other package you’ve installed through it. If anything in that chain gets updated or misconfigured, tools you installed months ago can just stop working with no warning.

The new standalone installer skips all of that. Instead of going through npm, it just downloads Claude Code directly to your machine and puts it in its own folder (~/.local/bin/). It updates itself in the background and doesn’t depend on Node.js or anything else. Think of the difference this way: npm was like installing an entire kitchen just to use one knife, and the standalone installer just hands you the knife.

It makes sense why this happened. npm was built for JavaScript developers who already have Node.js on their machines, but Claude Code’s audience grew way past that. Designers, PMs, and people who had never opened a terminal before were all setting up Node.js just to get Claude Code running. You’ll see this pattern a lot actually, where tools start out distributed through developer channels like npm and eventually ship their own installer once they outgrow that original audience.

HOW TO SWITCH TO THE NEW INSTALLER

Remove the old npm version, run the new installer, then restart your terminal completely (Cmd+Q iTerm, then reopen, not just a new tab):

npm uninstall -g @anthropic-ai/claude-code
curl -fsSL https://claude.ai/install.sh | bash

After restarting, run claude --version to verify you get a version number back.

IF IT STILL DOESN’T WORK

“command not found” after installing: Your shell might not have ~/.local/bin in its PATH. Add it manually:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

If you use bash instead of zsh, replace .zshrc with .bashrc.

Using asdf or nvm? Old shims can take priority over the new install. Make sure ~/.local/bin appears before your version manager’s shims in your PATH. You might also need to remove leftover shims:

rm -f ~/.asdf/shims/claude

Something still feels off? If you’re not sure what’s wrong, Claude Code has a built-in command that checks your whole installation for you and tells you exactly what it finds:

claude doctor

WHAT UPDATES LOOK LIKE FROM HERE

Once you’re on the new installer, you don’t need to think about updates anymore. It quietly keeps itself current in the background, so no more running npm update -g or wondering if you’re on an old version.

Deprecated way: npm install -g @anthropic-ai/claude-code (no longer supported, will eventually stop working)

Current way: curl -fsSL https://claude.ai/install.sh | bash (auto-updates, no dependencies)