Troubleshooting
Encountering problems? Don't worry! Here we've collected the most common issues and solutions. Most problems can find answers here.
Quick Diagnosis
Before diving into troubleshooting, try these general solutions first:
- Check terminal environment (Windows users recommended)
- Windows: Recommend using Git Bash, CMD/PowerShell only has basic compatibility
- macOS/Linux: Any terminal works
- Check Node.js version:
node --version(requires >= 20) - View CLI logs:
lovrabet logs - Re-login:
lovrabet auth - Check configuration:
lovrabet config list
Environment Compatibility Issues
Windows Terminal Environment Issues
Symptoms:
- Some commands execute abnormally in Windows CMD
- Encountering path or environment variable issues in PowerShell
- Character encoding or display issues
Recommended Solution:
📝 Suggestion: Use Git Bash First
-
Install Git for Windows
# Visit https://git-scm.com/download/win to download and install -
Open Git Bash
- Method 1: Right-click folder → "Git Bash Here"
- Method 2: Search "Git Bash" in Start menu
-
Verify Environment
# Run in Git Bash, confirm output contains bash
echo $0
# Test CLI command
lovrabet --help -
Terminal Support Status
- ✅ Git Bash - Fully tested and verified, recommended
- ⚠️ Windows CMD - Basic functions available, not thoroughly tested
- ⚠️ PowerShell - Basic functions available, may have some limitations
- ⚠️ Windows Terminal - Depends on the specific shell type configured
Installation Related Issues
Node.js Version Too Old
Error Symptoms:
- Error when installing CLI
- Syntax not supported
- Commands cannot execute properly
Solution:
# 1. Check current Node.js version
node --version
# 2. If version < 20, need to upgrade
# Visit https://nodejs.org/, download latest LTS version
# 3. Re-install CLI after installation completes
npm install --global @lovrabet/cli
Windows Users Special Note:
- After installing Node.js, close all Git Bash windows and reopen
- Must verify in Git Bash:
node --version - If you see Node.js in CMD but not in Git Bash, you may need to restart your computer
Cannot Download Lovrabet CLI
Error Symptoms:
npm install --global @lovrabet/clishows 404 error- Package not found
- Network connection timeout
Solution:
-
Check npm source configuration
# View npm configuration
npm config list
# Check ~/.npmrc file
cat ~/.npmrc -
Configure private registry
# Add to ~/.npmrc (contact admin for correct address)
@lovrabet:registry=https://your-private-registry.com/ -
Network issues
- Check network connection
- Disable VPN or proxy
- Contact IT support for enterprise firewall issues
Login Authentication Issues
Login Always Fails
Error Symptoms:
- Always prompted to re-login
- Browser cannot open local address
- Still shows unauthorized after login
Solution:
-
Clear login cache
# Delete login information files
rm -rf ~/.lovrabet/
# Re-login
lovrabet auth -
Browser issues
- Chrome/Edge: Click "Advanced" → "Proceed"
- Firefox: Click "Advanced" → "Add Exception"
- Safari: Click "Show Details" → "Visit Website"
-
System security software
- Temporarily disable firewall or antivirus
- Add CLI to trusted list
- May need to contact IT admin on corporate network
API Related Issues
API Pull Failed
Error Symptoms:
- Prompt "Please configure app code first"
- Cookie invalid or expired
- Network request timeout or failure
Solution:
-
Check login status
# Re-login
lovrabet auth
# Try again after confirming login success
lovrabet api pull -
Check application configuration
# View current configuration
lovrabet config list
# Set application code
lovrabet config set app your-app-code
# Or pass as parameter directly
lovrabet api pull your-app-code -
Network issues
# Check network connection
ping api.lovrabet.com
# Retry later
lovrabet api pull
Development Runtime Issues
Development Server Fails to Start
Error Symptoms:
lovrabet startcommand errors- Vite cannot start
- Port is occupied
Solution:
-
Check project dependencies
# Check if vite exists in package.json
cat package.json | grep vite
# If not, reinstall dependencies
npm install
# or
yarn install -
Port conflict
# View process occupying port 5173
lsof -i :5173
# Kill the process occupying the port
kill -9 <process-id>
# Or specify another port
PORT=3000 lovrabet start -
View detailed logs
# View CLI logs
lovrabet logs
# Or run vite directly
npx vite
Page Generation Issues
Page Creation Failed
Error Symptoms:
- Route path format incorrect
- Directory already exists
- Template file corrupted or missing
Solution:
-
Check route format
# Correct examples
about
user/profile
admin/user/list
# Wrong examples
/about # Cannot start with /
about/ # Cannot end with /
user profile # Cannot contain spaces
user@profile # Cannot contain special characters -
Handle directory conflicts
# Check if already exists
ls src/pages/user/profile
# If exists, use different path
# Or delete and recreate
rm -rf src/pages/user/profile
lovrabet add page -
Template issues
# Check if CLI template files are complete
# If encountering template errors, may need to reinstall CLI
npm install --global @lovrabet/cli
General Troubleshooting Steps
When you encounter any problem, you can troubleshoot in the following order:
1️⃣ Collect Information
# View CLI version
lovrabet --version
# View Node.js version
node --version
# View operating system
uname -a # Linux/Mac
ver # Windows
2️⃣ View Logs
# View CLI logs
lovrabet logs
# Clear logs and try again
lovrabet logs --clear
3️⃣ Check Configuration
# View project configuration
lovrabet config list
# View login status
ls ~/.lovrabet/
4️⃣ Reset Environment
# Re-login
rm -rf ~/.lovrabet/
lovrabet auth
# Reinstall CLI
npm uninstall --global @lovrabet/cli
npm install --global @lovrabet/cli
Still Can't Solve It?
If you've tried all the above methods and still can't solve it, you can:
- Check official documentation: Confirm your operation steps are correct
- Ask colleagues: Check if others encountered the same problem
- Contact technical support: Provide detailed error information and logs
Please provide the following information when seeking help:
- CLI version number
- Node.js version number
- Operating system version
- Specific error message
- Operation steps
- CLI log content