Skip to content

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:

  1. Increase Node.js memory limit: node --max-old-space-size=4096
  2. Reduce concurrent builds
  3. 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:

  1. Ensure you're editing files within the source directory
  2. Check for syntax errors in your files
  3. Restart the dev server
  4. 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:

  1. File naming conventions
  2. Frontmatter syntax
  3. Directory structure
  4. 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:

  1. Check component syntax
  2. Verify imports and exports
  3. Look for JavaScript errors in console
  4. 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:

  1. Optimize images
  2. Minimize JavaScript bundles
  3. Use lazy loading
  4. Enable compression
  5. Check network requests

Q: Large bundle sizes

A: Reduce bundle size by:

  • Tree shaking unused code
  • Code splitting
  • Optimizing dependencies
  • Using dynamic imports

VitePress Development Guide