Installation Issues
npm: command not found
npm: command not found
Node.js and npm are not installed.Solution:Verify installation:
- macOS
- Linux
- Windows
EACCES permission denied errors
EACCES permission denied errors
You don’t have permission to install global packages.Solution 1: Configure npm to use a different directory (Recommended)Solution 2: Fix npm permissionsSolution 3: Use npx (no installation needed)
Old version being used
Old version being used
npm cache has an outdated version.Solution:
Configuration Issues
Configuration not loading
Configuration not loading
Configuration files aren’t being read.Diagnosis:Solutions:1. Verify file locations:2. Check file permissions:3. Validate syntax:4. Check working directory:
API key not recognized
API key not recognized
API key isn’t being read from config or environment.Diagnosis:Solutions:1. Reload shell configuration:2. Verify API key format:4. Test API key directly:
- Must start with
sk-mega- - At least 20 characters long
- No spaces or quotes around the key
Wrong base URL being used
Wrong base URL being used
Tool is connecting to the wrong API endpoint.Diagnosis:Solution:Ensure base URL is exactly:Common mistakes:Fix:
Configuration priority issues
Configuration priority issues
Wrong configuration is being used.Understanding Priority:Diagnosis:Solution:Remove conflicting configurations or use the right priority level:
1
Environment Variables (Highest)
Variables set in shell always take precedence
2
Project-Level Config
Config in current directory (
.claude/, opencode.json)3
System-Level Config (Lowest)
Global config in home directory (
~/.claude/, ~/.codex/, ~/.config/opencode/)CLI Execution Issues
CLI hangs or freezes
CLI hangs or freezes
CLI is stuck during execution.Solutions:1. Cancel and retry:2. Check for prompts:
The CLI may be waiting for input. Look for questions like:4. Check for background processes:
- “Enter your API key:”
- “Continue? (y/n)”
Tool not detected
Tool not detected
CLI says a tool isn’t installed but it is.Diagnosis:Solutions:1. Ensure global installation:2. Restart terminal:3. Check PATH:4. Manual configuration:
If detection fails, configure manually without the CLI.
Permission denied when creating config files
Permission denied when creating config files
CLI can’t write to configuration directories.Solution:macOS/Linux:Windows:
Run terminal as Administrator or fix folder permissions in File Explorer.
API Connection Issues
API connection failed
API connection failed
Can’t connect to MegaLLM API.Diagnosis:Solutions:1. Check internet connection:2. Check firewall/proxy:3. Verify API key:
- Go to megallm.io/dashboard
- Generate a new API key
- Update your configuration
401 Unauthorized error
401 Unauthorized error
Rate limit exceeded
Rate limit exceeded
Too many API requests in a short time.Solution:1. Wait and retry:
Rate limits reset after a period (usually 1 minute).2. Check your usage:
- Go to megallm.io/dashboard
- View API usage statistics
Shell and Environment Issues
Environment variables not persisting
Environment variables not persisting
Variables are lost after closing terminal.Solution:Environment variables must be added to shell config files:Verify:
Shell config not reloading
Shell config not reloading
Changes to shell config aren’t taking effect.Solutions:1. Reload shell config:2. Restart terminal:
Close and reopen your terminal application.3. Check for syntax errors:4. Check file was actually modified:
Platform-Specific Issues
macOS: Command not found after installation
macOS: Command not found after installation
PATH isn’t updated for npm global packages.Solution:
Windows: PowerShell execution policy
Windows: PowerShell execution policy
Scripts are blocked by PowerShell execution policy.Solution:
Linux: /usr/local/lib permission issues
Linux: /usr/local/lib permission issues
Can’t install global packages due to permissions.Solution:
Advanced Troubleshooting
Enable Debug Mode
Get detailed logs to diagnose issues:Complete Reset
If all else fails, completely reset configuration:Collect Diagnostic Information
For support requests, collect this information:Still Need Help?
If you’re still experiencing issues:Check FAQ
Common questions and answers
Email Support
Get help from our team
GitHub Issues
Report bugs or search existing issues
Discord Community
Ask the community
Prevention Tips
Keep Tools Updated
Regularly update Node.js, npm, and AI tools
Backup Configs
Keep backups of working configurations
Test After Changes
Verify configuration after manual edits
Use Version Control
Commit working configs (without API keys)

