Troubleshooting
Common issues and solutions when using Zcrafter.
Installation Issues
Permission Errors (EACCES)
Problem:
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modulesSolution:
Use sudo when installing:
sudo npm install -g zcrafterNode.js Version Too Old
Problem:
Error: Requires Node.js >= 16.0.0Solution:
Upgrade Node.js by downloading the latest LTS version from nodejs.org.
Command Not Found
Problem:
zcrafter: command not foundSolutions:
- Verify installation completed:
 
npm list -g zcrafter- Reinstall Zcrafter:
 
npm uninstall -g zcrafter
npm install -g zcrafter- Restart your terminal after installation
 
API Key Issues
Key not set
Problem:
Error: API key requiredSolution: Set your key:
export OPENROUTER_API_KEY="your-api-key"Then restart your terminal or run source ~/.zshrc if you added it to your profile.
Invalid API key
Problem:
Error: Invalid API keySolution: Generate a new key from openrouter.ai and set it again:
export OPENROUTER_API_KEY="new-key"Usage Issues
429 or rate limit errors
Problem:
Error: Too Many Requests (429)Solutions:
- Try again in a minute
 - Use shorter prompts
 - Select a different model
 
Network Errors
Problem:
Error: Network request failed
Error: ECONNREFUSEDSolutions:
- Check your internet connection
 - Verify you can access other websites
 - Check if your firewall is blocking the connection
 - Try again in a few moments
 
Slow Responses
Problem: Zcrafter takes too long to respond
Solutions:
- Check your internet connection speed
 - Use shorter, more specific prompts
 - Try again during off-peak hours
 - If the problem persists, the service may be experiencing high load
 
Interactive Mode Issues
Terminal Display Issues
Problem: Garbled text or weird characters
Solutions:
- Try a different terminal application
 - Update your terminal software to the latest version
 - Restart your terminal
 
Commands Not Working
Problem: Typed commands don't execute
Solutions:
- Check for typos:
 
/hlep   (incorrect)
/help   (correct)- Make sure there are no spaces after the slash:
 
/ login  (incorrect)
/login   (correct)- Try pressing Enter after the command
 
Can't Exit
Problem: /exit doesn't work
Solutions:
- Try typing:
 
/quit- Press Ctrl+C twice
 - Close the terminal window
 
Common Error Messages
ENOSPC
Problem:
Error: ENOSPC: no space left on deviceSolution:
Free up disk space on your computer. Delete unnecessary files or move files to external storage.
EPERM
Problem:
Error: EPERM: operation not permittedSolution:
Use sudo when installing:
sudo npm install -g zcrafterGetting Additional Help
If you can't resolve your issue:
- 
Check this documentation
- Review Installation
 - Review API Key Setup
 - Review Using Zcrafter
 
 - 
Run in debug mode
 
Type:
zcrafter --debugThis provides additional error information that may help identify the problem.
- 
Restart and try again
- Close your terminal
 - Open a new terminal window
 - Try the command again
 
 - 
Reinstall Zcrafter
 
If all else fails, try reinstalling:
npm uninstall -g zcrafter
npm install -g zcrafterTips for Preventing Issues
- Keep Node.js updated: Regularly update to the latest LTS version
 - Be specific with questions: Clear questions get better responses
 - Keep Zcrafter updated: Run 
npm update -g zcrafterperiodically 
Next Steps
- Review Getting Started
 - Learn about Using Zcrafter