Troubleshooting
Common issues and solutions when using xSwarm
Troubleshooting
This guide helps you resolve common issues when using xSwarm.
Installation Issues
Node.js Version Error
Problem: Error message about Node.js version compatibility
Solution:
- Check your Node.js version:
node --version
- Ensure you have Node.js 18 or higher
- Update Node.js if needed:
- Using nvm:
nvm install 18
- Download from nodejs.org
- Using nvm:
Permission Denied Error
Problem: Permission denied when installing globally
Solution:
- Use npx instead of global install:
npx xswarm
- Or fix npm permissions:
npm config set prefix ~/.npm-global echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc source ~/.bashrc
Package Not Found
Problem: “xswarm: command not found”
Solution:
- Verify installation:
npm list -g xswarm
- Reinstall if needed:
npm install -g xswarm
- Or use npx directly:
npx xswarm
Runtime Issues
xSwarm Not Responding
Problem: xSwarm seems stuck or unresponsive
Solution:
- Press
Ctrl+C
to interrupt - Restart xSwarm
- Check your internet connection (needed for AI features)
- Clear any corrupted cache:
rm -rf ~/.xswarm/cache
API Key Issues
Problem: “Invalid API key” or authentication errors
Solution:
- Verify your API key is correctly set
- Check API key permissions
- Ensure you’re not exceeding rate limits
- Try regenerating your API key
Memory Issues
Problem: “Out of memory” errors
Solution:
- Close unnecessary applications
- Increase Node.js memory limit:
NODE_OPTIONS="--max-old-space-size=4096" xswarm
- Work on smaller tasks incrementally
AI Agent Issues
Inconsistent Responses
Problem: AI agents giving inconsistent or conflicting advice
Solution:
- Provide more specific context
- Reference previous decisions explicitly
- Use clear, unambiguous language
- Break complex requests into smaller parts
Code Generation Errors
Problem: Generated code has syntax errors or doesn’t work
Solution:
- Always review generated code
- Ask for corrections:
> The previous code has a syntax error on line 15. Please fix it.
- Provide more context about your environment
- Specify the exact versions of libraries you’re using
Context Loss
Problem: xSwarm seems to forget previous conversations
Solution:
- Reference previous work explicitly:
> Continue from where we left off with the user authentication
- Summarize key decisions:
> Remember: we're using JWT tokens and PostgreSQL
- Save important code snippets locally
Performance Issues
Slow Response Times
Problem: xSwarm takes too long to respond
Solution:
- Check your internet connection speed
- Try simpler, more focused requests
- Avoid requesting too many parallel tasks
- Use specific agents instead of general requests
High CPU Usage
Problem: xSwarm consuming too much CPU
Solution:
- Limit concurrent operations
- Close other resource-intensive applications
- Monitor system resources
- Consider upgrading hardware
Project-Specific Issues
Git Integration Problems
Problem: Issues with Git operations
Solution:
- Ensure Git is installed and configured
- Check repository permissions
- Verify you’re in a Git repository
- Manually resolve any Git conflicts
File Permission Errors
Problem: Cannot read or write files
Solution:
- Check file permissions:
ls -la
- Fix permissions if needed:
chmod 644 filename
- Ensure you’re in the correct directory
- Run xSwarm with appropriate permissions
Framework Compatibility
Problem: Generated code doesn’t work with your framework
Solution:
- Specify your framework version:
> I'm using React 18 with TypeScript
- Mention any special configurations
- Provide example code from your project
- Ask for framework-specific implementations
Best Practices for Avoiding Issues
1. Clear Communication
- Be specific about requirements
- Provide context and constraints
- Mention technology versions
2. Incremental Development
- Start with small tasks
- Test each component
- Build complexity gradually
3. Regular Saves
- Save important code locally
- Use version control
- Document key decisions
4. Environment Consistency
- Document your setup
- Use consistent versions
- Maintain clean dependencies
Getting Help
Community Support
- GitHub Issues: Report bugs
- Discussions: Ask questions
- Documentation: Review our comprehensive docs
Direct Support
- Email: chadananda@gmail.com
- Twitter: @xswarmai
Debug Mode
Enable debug mode for more information:
DEBUG=xswarm* xswarm
Logs
Check logs for detailed error information:
cat ~/.xswarm/logs/xswarm.log
Common Error Messages
”Rate limit exceeded”
Wait a few minutes before trying again, or upgrade your API plan.
”Context too long”
Break your request into smaller parts or start a new session.
”Network error”
Check your internet connection and firewall settings.
”Invalid project structure”
Ensure you’re in a valid project directory with proper structure.
Next Steps
- Review Best Practices
- Explore Advanced Features
- Join our Community