Claude Code: npm-Installation auf nativen Installer umgestellt
npm install -g @anthropic-ai/claude-code ist deprecated. Neuer Installer: curl -fsSL https://claude.ai/install.sh | bash Binary landet in ~/.local/bin (kein npm-global-PATH-Setup mehr noetig).
This commit is contained in:
parent
6803561016
commit
40779d1817
4 changed files with 24 additions and 23 deletions
|
|
@ -28,24 +28,26 @@ if [[ -n "$CLAUDE_BIN" ]]; then
|
|||
else
|
||||
issue "claude Binary nicht gefunden"
|
||||
info "PATH: $PATH"
|
||||
# npm global bin pruefen
|
||||
NPM_BIN=$(npm bin -g 2>/dev/null || npm root -g 2>/dev/null | sed 's|/node_modules||')
|
||||
if [[ -n "$NPM_BIN" ]]; then
|
||||
info "npm global bin: $NPM_BIN"
|
||||
if [[ -f "$NPM_BIN/claude" ]]; then
|
||||
warn "claude liegt in $NPM_BIN aber ist nicht im PATH"
|
||||
# Neue Installationsorte pruefen (~/.local/bin, /usr/local/bin)
|
||||
for loc in "$HOME/.local/bin/claude" "/usr/local/bin/claude"; do
|
||||
if [[ -f "$loc" ]]; then
|
||||
warn "claude liegt in $loc aber ist nicht im PATH"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
info "Fix: curl -fsSL https://claude.ai/install.sh | bash"
|
||||
fi
|
||||
|
||||
# ── 2. npm Paket ───────────────────────────────────────────────────────
|
||||
echo -e "\n=== 2. npm Paket ==="
|
||||
if npm list -g @anthropic-ai/claude-code --depth=0 2>/dev/null | grep -q claude-code; then
|
||||
# ── 2. Installation ────────────────────────────────────────────────────
|
||||
echo -e "\n=== 2. Installation ==="
|
||||
if [[ -n "$CLAUDE_BIN" ]]; then
|
||||
ok "Binary vorhanden: $CLAUDE_BIN"
|
||||
elif npm list -g @anthropic-ai/claude-code --depth=0 2>/dev/null | grep -q claude-code; then
|
||||
PKG=$(npm list -g @anthropic-ai/claude-code --depth=0 2>/dev/null | grep claude-code)
|
||||
ok "Paket installiert: $PKG"
|
||||
warn "Veraltete npm-Installation gefunden: $PKG"
|
||||
info "Migration: curl -fsSL https://claude.ai/install.sh | bash"
|
||||
else
|
||||
issue "@anthropic-ai/claude-code nicht als npm-Globalpaket installiert"
|
||||
info "Fix: npm install -g @anthropic-ai/claude-code"
|
||||
issue "claude nicht installiert"
|
||||
info "Fix: curl -fsSL https://claude.ai/install.sh | bash"
|
||||
fi
|
||||
|
||||
# ── 3. Config-Verzeichnisse ────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue