Installation Issues
Script Permission Denied
-bash: ./create_cc_alias.sh: Permission denied
Solution: Make the script executable:
chmod +x create_cc_alias.sh
./create_cc_alias.sh
Claude Binary Not Found
🛑 The 'claude' binary could not be found in your PATH
Solution: Install Claude Code CLI first:
- Visit Claude Code installation guide
- Follow the installation instructions for your system
- Verify installation:
claude --version
- Run the CC alias installer again
Node.js Version Too Old
🛑 Your Node.js version is too old
Solution: Upgrade Node.js to version 22 or higher:
# Using Homebrew
brew install node@22
brew link --overwrite node@22
# Or using nvm
nvm install 22
nvm use 22
nvm alias default 22
Alias Already Exists
✅ The 'cc' function already exists in ~/.zprofile
Solution: The installer will prompt you to update. Choose 'y' to update or 'n' to keep existing.
To manually remove and reinstall:
# Edit ~/.zprofile and remove the cc() function
nano ~/.zprofile
# Delete the cc() function block
# Run installer again
./create_cc_alias.sh
Connection Issues
OTEL Collector Unreachable
Could not connect to OTEL collector at localhost:4317
Solutions:
- Start the OTEL collector:
cd claude-code-otel docker-compose up -d
- Check if Docker is running:
docker ps
- Verify port availability:
lsof -i :4317
- Skip OTEL setup: Press 's' when prompted to launch without telemetry
Netcat Not Available
⚠️ The 'nc' (netcat) command is not available
This is optional but recommended. To install:
brew install netcat
The script will still work without netcat, but won't test connectivity.
Invalid OTEL Endpoint Format
Could not parse host from OTEL_EXPORTER_OTLP_ENDPOINT
Solution: Check your endpoint format in ~/.env.cc
:
# Correct formats:
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
OTEL_EXPORTER_OTLP_ENDPOINT=https://otel.example.com:4317
# Incorrect formats:
OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317 # Missing protocol
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost # Missing port
Configuration Issues
Environment Variables Not Loading
~/.env.cc file not found
Solution: Create or restore the environment file:
# Re-run the installer to create it
./create_cc_alias.sh
# Or manually create it
cat > ~/.env.cc << 'EOF'
CLAUDE_CODE_ENABLE_TELEMETRY=1
OTEL_METRICS_EXPORTER=otlp
OTEL_LOGS_EXPORTER=otlp
OTEL_EXPORTER_OTLP_PROTOCOL=grpc
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
EOF
Invalid Environment Variable Format
Ignoring invalid line in ~/.env.cc
Solution: Check variable format:
# Correct format:
VARIABLE_NAME=value
ANOTHER_VAR="value with spaces"
# Incorrect format:
VARIABLE NAME=value # Space in name
export VARIABLE=value # Don't use 'export'
VARIABLE = value # Spaces around =
CC Command Not Working
zsh: command not found: cc
Solutions:
- Reload your profile:
source ~/.zprofile
- Open a new terminal window
- Verify the function exists:
grep "cc()" ~/.zprofile
- Check your shell:
echo $SHELL # Should be /bin/zsh
Docker & Grafana Issues
Docker Not Running
Cannot connect to the Docker daemon
Solution: Start Docker Desktop:
- Open Docker Desktop application
- Wait for Docker to start (icon turns green)
- Verify:
docker ps
Port Already in Use
bind: address already in use
Solution: Find and stop the conflicting process:
# Find what's using port 4317
lsof -i :4317
# Find what's using port 3000 (Grafana)
lsof -i :3000
# Kill the process (replace PID with actual process ID)
kill -9 PID
# Or change the port in docker-compose.yml
Grafana Login Issues
Default credentials:
- Username:
admin
- Password:
admin
To reset admin password:
docker exec -it grafana grafana-cli admin reset-admin-password newpassword
Advanced Troubleshooting
Debug Mode
Enable verbose output for troubleshooting:
# Run installer with debug output
bash -x create_cc_alias.sh
# Test the cc function with debug
set -x
cc
set +x
Manual Cleanup
To completely remove CC alias and start fresh:
# Remove the cc function from ~/.zprofile
sed -i '' '/^cc()/,/^}/d' ~/.zprofile
# Remove environment file
rm ~/.env.cc
# Remove Docker containers (if using)
docker-compose down -v
# Start fresh
./create_cc_alias.sh
Check All Components
Comprehensive system check:
#!/bin/bash
echo "=== System Check ==="
echo "Shell: $SHELL"
echo "Claude: $(which claude || echo 'Not found')"
echo "Node: $(node --version 2>/dev/null || echo 'Not found')"
echo "Docker: $(docker --version 2>/dev/null || echo 'Not found')"
echo "Netcat: $(which nc || echo 'Not found')"
echo ""
echo "=== Configuration Check ==="
echo "Profile exists: $(test -f ~/.zprofile && echo 'Yes' || echo 'No')"
echo "CC function: $(grep -q 'cc()' ~/.zprofile 2>/dev/null && echo 'Yes' || echo 'No')"
echo "Env file: $(test -f ~/.env.cc && echo 'Yes' || echo 'No')"
echo ""
echo "=== OTEL Check ==="
nc -zv localhost 4317 2>&1 || echo "OTEL not reachable"
Getting Help
If you're still experiencing issues:
- Check the GitHub Issues: View existing issues
- Create a new issue with:
- Your macOS version
- Node.js version (
node --version
) - Claude Code version (
claude --version
) - The exact error message
- Steps to reproduce the issue
- Community support: Check the Claude Code OTEL project for telemetry-specific issues