Debugging FAQ
Common debugging questions and solutions for VitePress development.
Build Issues
Q: My build is failing with "out of memory" errors
A: Try these solutions:
- Increase Node.js memory limit:
node --max-old-space-size=4096
- Reduce concurrent builds
- Check for memory leaks in custom components
Q: Build works locally but fails in CI/CD
A: Common causes:
- Different Node.js versions
- Missing environment variables
- Case-sensitive file paths
- Insufficient memory in CI environment
Development Server Issues
Q: Hot reload is not working
A: Check these items:
- Ensure you're editing files within the source directory
- Check for syntax errors in your files
- Restart the dev server
- Clear browser cache
Q: Dev server is slow to start
A: Possible solutions:
- Reduce the number of pages
- Optimize images and assets
- Check for infinite loops in components
- Use
--debug
flag to identify bottlenecks
Routing Problems
Q: My pages are not generating correctly
A: Verify:
- File naming conventions
- Frontmatter syntax
- Directory structure
- Route configuration
Q: 404 errors on deployed site
A: Common fixes:
- Check base URL configuration
- Verify file paths are correct
- Ensure proper server configuration for SPA routing
Component Issues
Q: Vue components are not rendering
A: Debug steps:
- Check component syntax
- Verify imports and exports
- Look for JavaScript errors in console
- Test component in isolation
Q: CSS styles are not applying
A: Troubleshooting:
- Check CSS syntax
- Verify scoped styles
- Look for conflicting styles
- Test with browser dev tools
Performance Issues
Q: Site is loading slowly
A: Optimization steps:
- Optimize images
- Minimize JavaScript bundles
- Use lazy loading
- Enable compression
- Check network requests
Q: Large bundle sizes
A: Reduce bundle size by:
- Tree shaking unused code
- Code splitting
- Optimizing dependencies
- Using dynamic imports