Troubleshooting
Common issues and solutions when working with Rhyla. If you're experiencing problems, check this guide first!
Installation Issues
"command not found: rhyla"
Problem: Rhyla CLI is not accessible after installation.
Solutions:
-
Verify installation:
npm list -g rhyla -
Reinstall globally:
npm uninstall -g rhyla npm install -g rhyla -
Check npm global path:
npm config get prefixAdd to your PATH if needed:
# macOS/Linux (.zshrc or .bashrc) export PATH="$PATH:$(npm config get prefix)/bin" # Windows (PowerShell as Admin) $env:Path += ";$(npm config get prefix)" -
Use npx as alternative:
npx rhyla dev
Node.js Version Error
Problem: "Error: Requires Node.js version 14 or higher"
Solution:
-
Check your Node.js version:
node --version -
Update Node.js:
- Visit nodejs.org and install the latest LTS version
- Or use nvm:
nvm install --lts nvm use --lts
Development Server Issues
Port Already in Use
Problem: "Error: Port 3000 is already in use"
Solutions:
-
Kill the process using the port:
# macOS/Linux lsof -ti:3000 | xargs kill # Windows netstat -ano | findstr :3000 taskkill /PID <PID> /F -
Use a different port:
PORT=3001 rhyla dev
Hot Reload Not Working
Problem: Changes to files don't trigger page reload.
Solutions:
-
Restart dev server:
# Stop with Ctrl+C, then: rhyla dev -
Check file paths:
- Ensure files are in
body/,styles/, orpublic/ - File names should not contain special characters
- Ensure files are in
-
Clear browser cache:
- Hard reload: Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)
-
Check console for errors:
- Open browser DevTools (F12)
- Look for errors in Console tab
Blank Page on Dev Server
Problem: http://localhost:3000 shows a blank page.
Solutions:
-
Check for errors:
rhyla dev # Look for error messages in terminal -
Verify project structure:
ls -la # Should show: config.json, body/, styles/, public/ -
Check config.json syntax:
- Validate JSON at jsonlint.com
- Look for missing commas, brackets, quotes
-
Ensure home.md exists:
ls body/home.md
Build Issues
Build Fails with Errors
Problem: rhyla build command fails.
Solutions:
-
Check error message:
- Read the full error in terminal
- Common errors: invalid JSON, missing files, syntax errors
-
Validate config.json:
cat config.json | python -m json.tool -
Check markdown syntax:
- Ensure all code blocks are properly closed
- Look for unclosed HTML tags (if
allow_raw_htmlis enabled)
-
Clear and rebuild:
rm -rf dist rhyla build
Missing Files in dist/
Problem: Some files are missing from the dist/ folder after build.
Solutions:
-
Check build_ignore:
{ "build_ignore": ["drafts", "private"] }Remove paths you want to include.
-
Verify file locations:
- Files must be in
body/,public/, orstyles/ - Check for typos in file names
- Files must be in
-
Check sidebar config:
- Files must be referenced in sidebar to be built
- Or ensure they're in a folder that's referenced
Sidebar Issues
Sidebar Not Showing Pages
Problem: Pages don't appear in the sidebar.
Solutions:
-
Check config.json:
{ "sidebar": [ "home", "getting-started" // Must match file name without extension ] } -
Verify file exists:
ls body/getting-started.md -
Check file path:
- Use relative path from
body/folder - For nested files:
"folder/filename"
- Use relative path from
-
Restart dev server:
# Ctrl+C to stop, then: rhyla dev
Sidebar Groups Not Collapsing
Problem: Sidebar groups don't expand/collapse.
Solutions:
-
Check JavaScript errors:
- Open browser DevTools (F12)
- Look for errors in Console
-
Verify config.json structure:
{ "sidebar": [ { "title": "Group Name", "children": ["page1", "page2"] } ] } -
Clear browser cache:
- Hard reload: Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)
Password Authentication Issues
Password Not Working
Problem: Correct password is rejected.
Solutions:
-
Check config.json:
{ "password_doc": { "enabled": true, "passwords": ["yourPassword"] // Case-sensitive! } } -
Clear localStorage:
// In browser console (F12): localStorage.clear(); location.reload(); -
Use logout command:
// In browser console: rhylaLogout(); -
Check for typos:
- Passwords are case-sensitive
- No extra spaces in config.json
Blocked After 5 Attempts
Problem: "Access Blocked" message appears.
Solutions:
-
Wait 5 minutes:
- Automatic unlock after timeout
-
Clear localStorage:
// In browser console (F12): localStorage.clear(); location.reload(); -
Use rhylaLogout():
// In browser console: rhylaLogout();
Password Protection Not Enabled
Problem: Site is accessible without password.
Solutions:
-
Check enabled flag:
{ "password_doc": { "enabled": true, // Must be true! "passwords": ["password123"] } } -
Verify config.json is deployed:
- Check
dist/config.jsonexists - Ensure it's uploaded to server
- Check
-
Clear browser cache:
- Password auth script may be cached
Styling Issues
Custom Styles Not Applied
Problem: Changes to CSS files don't show up.
Solutions:
-
Hard reload browser:
- Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)
-
Check file location:
- CSS must be in
styles/folder - Files:
global.css,dark.css,light.css
- CSS must be in
-
Verify CSS syntax:
- Look for missing semicolons, brackets
- Use browser DevTools to check for CSS errors
-
Rebuild project:
rhyla build rhyla serve
Theme Switcher Not Working
Problem: Can't switch between light/dark themes.
Solutions:
-
Check browser console:
- Open DevTools (F12)
- Look for JavaScript errors
-
Clear localStorage:
localStorage.removeItem('theme'); location.reload(); -
Verify CSS files exist:
ls styles/dark.css styles/light.css
Search Issues
Search Not Finding Pages
Problem: Search returns no results for pages that exist.
Solutions:
-
Rebuild search index:
rhyla build -
Check search_index.json:
cat dist/scripts/search_index.json -
Verify page is in sidebar:
- Only pages in sidebar are indexed
-
Check page content:
- Empty pages won't be indexed
- Add meaningful content to pages
Deployment Issues
404 on Page Refresh
Problem: Refreshing page shows 404 error.
Solutions:
Vercel:
Create vercel.json:
{
"rewrites": [
{ "source": "/(.*)", "destination": "/index.html" }
]
}
Netlify:
Create netlify.toml:
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
Nginx:
location / {
try_files $uri $uri/ /index.html;
}
Assets Not Loading
Problem: Images, CSS, or JS files return 404.
Solutions:
-
Check base path:
{ "base": "/your-subdirectory/" // Include trailing slash! } -
Verify file paths:
- Use absolute paths:
/public/logo.png - Not relative:
./public/logo.png
- Use absolute paths:
-
Check deployment folder:
- Ensure
dist/folder is deployed - Not the root project folder
- Ensure
Custom Domain Not Working
Problem: Custom domain shows error or doesn't resolve.
Solutions:
-
Check DNS records:
# For root domain: A @ your-host-ip # For subdomain: CNAME docs your-host-url -
Wait for propagation:
- DNS changes take 24-48 hours
- Check status: whatsmydns.net
-
Verify SSL certificate:
- Most platforms auto-provision SSL
- Check platform documentation
Performance Issues
Slow Page Load
Problem: Pages take long to load.
Solutions:
-
Optimize images:
- Compress images before adding to
public/ - Use WebP format when possible
- Recommended max size: 500KB per image
- Compress images before adding to
-
Minimize custom CSS:
- Remove unused styles
- Combine multiple CSS files
-
Reduce page size:
- Split large pages into multiple smaller pages
- Use pagination for long lists
-
Enable caching:
- Configure cache headers on hosting platform
Large Build Size
Problem: dist/ folder is very large.
Solutions:
-
Use build_ignore:
{ "build_ignore": ["drafts", "examples", "assets/raw"] } -
Optimize assets:
- Compress images
- Remove unused fonts
- Minimize custom scripts
-
Clean before build:
rm -rf dist rhyla build
Common Error Messages
"Cannot read property of undefined"
Cause: Invalid config.json or missing required fields.
Fix:
{
"title": "My Docs",
"description": "Description",
"sidebar": [] // Must be present
}
"ENOENT: no such file or directory"
Cause: Referenced file doesn't exist.
Fix:
- Check file path in error message
- Verify file exists in
body/folder - Check for typos in config.json
"SyntaxError: Unexpected token"
Cause: Invalid JSON in config.json.
Fix:
- Validate at jsonlint.com
- Check for:
- Missing commas
- Extra commas
- Unclosed brackets
- Unquoted keys
Getting More Help
If your issue isn't covered here:
-
Check documentation:
-
Enable verbose logging:
DEBUG=* rhyla dev -
Check browser console:
- Press F12
- Look for error messages
- Copy full error text
-
Verify project structure:
tree -L 2 -
Create minimal reproduction:
- Start with
rhyla init - Add minimal changes to reproduce issue
- Start with
Debug Checklist
When troubleshooting, check:
- [ ] Node.js version (14+)
- [ ] Valid config.json syntax
- [ ] All referenced files exist
- [ ] Correct file paths in sidebar
- [ ] Browser console for errors
- [ ] Terminal output for errors
- [ ] Latest version of Rhyla
- [ ] Clear browser cache
- [ ] Restart dev server
Still Having Issues?
Need support? Check the GitHub repository for issues and discussions! 💬