Skip to main content

Installation Issues

Node.js and npm are not installed.Solution:
Verify installation:
You don’t have permission to install global packages.Solution 1: Configure npm to use a different directory (Recommended)
Solution 2: Fix npm permissions
Solution 3: Use npx (no installation needed)
npm cache has an outdated version.Solution:

Configuration Issues

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 isn’t being read from config or environment.Diagnosis:
Solutions:1. Reload shell configuration:
2. Verify API key format:
  • Must start with sk-mega-
  • At least 20 characters long
  • No spaces or quotes around the key
3. Set environment variable manually:
4. Test API key directly:
Tool is connecting to the wrong API endpoint.Diagnosis:
Solution:Ensure base URL is exactly:
Common mistakes:
Fix:
Wrong configuration is being used.Understanding Priority:
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/)
Diagnosis:
Solution:Remove conflicting configurations or use the right priority level:

CLI Execution Issues

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:
  • “Enter your API key:”
  • “Continue? (y/n)”
3. Run with debug mode:
4. Check for background processes:
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.
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

Can’t connect to MegaLLM API.Diagnosis:
Solutions:1. Check internet connection:
2. Check firewall/proxy:
3. Verify API key:4. Check API status: Visit megallm.io/status for service status
API key is invalid or expired.Solution:1. Generate new API key:2. Update config:
3. Clear and reset:
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:3. Upgrade plan: If you consistently hit rate limits, consider upgrading your plan.4. Implement retry logic:

Shell and Environment Issues

Variables are lost after closing terminal.Solution:Environment variables must be added to shell config files:
Verify:
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

PATH isn’t updated for npm global packages.Solution:
Scripts are blocked by PowerShell execution policy.Solution:
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)