[BUG] Constant warning that "claude symlink points to invalid binary"

Status Fixed / completed
Maintainer reply ✓ Yes — ant-kurt
Activity 5 comments · opened Sep 19, 2025 · closed Sep 24, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Every time I start claude I get this warning:

● Claude symlink points to invalid binary: ../lib/node_modules/@anthropic-ai/claude-code/cli.js

I haven't been able to find anything online about what would cause this, or how to fix it.

I start claude with ~/.local/bin/claude which is a (relative) symlink to ~/.local/lib/node_modules/@anthropic-ai/claude-code/cli.js

What Should Happen?

I shouldn't get this warning on startup

Error Messages/Logs

● Claude symlink points to invalid binary: ../lib/node_modules/@anthropic-ai/claude-code/cli.js

Steps to Reproduce

  1. On linux configure npm prefix to be ~/.local: npm config prefix ~/.local
  2. Install claude with `npm install -g @anthropic-ai/claude-code
  3. start claude
  4. see warning

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

not sure

Claude Code Version

1.0.119 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

5 Comments

ant-kurt collaborator · 11 months ago

Can you check your ~/.claude.json to see "installMethod"?

aureq · 11 months ago

@ant-kurt In my case installMethod value is unknown.

For context:

  • I run claude in a container (k8s)
  • I've modified npm prefix to point to $HOME/.local (npm config set prefix $HOME/.local) as a way to avoid a dangling $HOME/node_modules.
  • I use npm install -g @anthropic-ai/claude-code to install claude (which installs it in $HOME/.local/lib/node_modules/@anthropic-ai/claude-code

Except for the warning, Claude appears to be working just fine.

tmccombs · 11 months ago

My installMethod is also unknown

ant-kurt collaborator · 11 months ago

This should be fixed in the next release.

github-actions[bot] · 11 months ago

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.