NV Elements Catalog Starters Repo System Themes About Getting Started Changelog Metrics Support Accessibility Contributions Requests Migration Deprecations Integrations Installation MCP CLI Lint Angular Bundles Extensions Go Hugo Import Maps Lit NextJS Nuxt Preact React SolidJS Svelte TypeScript Vue Foundations Typography Iconography Themes Design Tokens Size & Space Objects Interactions Support Status Color Animation Fonts Layers Custom Layout Horizontal Vertical Grid Popovers i18n Visualization View Transitions Elements Accordion Alert Avatar Badge Breadcrumb Button Button Group Card Chat Message Checkbox Color Combobox Copy Button Datagrid Integrations Column Action Column Alignment Column Fixed Column width Container Card Display Settings Footer Heatmap Keynav Multi Select Pagination Panel Detail Panel Grid Performance Placeholder Row Action Row Groups Row Sort Scroll Height Single Select Stripe Date Datetime Dialog Divider Dot Drawer Dropdown Dropdown Group Dropzone File Forms Validation Actions Control Icon Icon Button Input Input Group Logo Menu Month Notification Page Page Header Page Loader Pagination Panel Progressive Filter Chip Progress Bar Progress Ring Password Preferences Input Pulse Radio Range Resize Handle Search Select Skeleton Sort Button Sparkline Star Rating Steps Switch Tabs Tag Textarea Time Toast Toggletip Toolbar Tooltip Tree Week Patterns Authentication Browse Dashboard Editor Empty States Heatmap Keyboard Shortcut Logging Media Onboarding Panel Responsive Search Subheader Trend Code Codeblock Monaco Input Diff Input Editor Diff Editor Problems Markdown Markdown CSS Utility Labs Responsive Layout Viewport Container Patterns Forms API Design Properties & Attributes Slots Registration CustomEvents Stateless Composition Styles Packaging Glossary Logs Internal Guidelines Agent Harness Documentation Examples TypeScript Testing Unit Testing Accessibility Testing Lighthouse Testing SSR Testing Visual Testing Troubleshooting Component Creation Internal Examples All Examples

Troubleshooting

This guide covers common issues and solutions for test failures, build errors, performance regressions, and development environment problems.

Test Failures

Unit Test Timing Issues

  • Symptom: Tests fail intermittently or when accessing element properties
  • Cause: Component not fully rendered or updated before assertions
  • Solution: Always wait for elementIsStable() before assertions

    

Missing Fixture Cleanup

  • Symptom: Tests pass individually but fail when run together
  • Cause: DOM pollution from previous tests
  • Solution: Always use removeFixture() in afterEach()

    

Event Timing Problems

  • Symptom: Event listeners don't trigger or receive wrong values
  • Cause: Events fire before listeners attached or before element stable
  • Solution: Use untilEvent() helper and ensure stability

    

Visual Regression Failures

Theme Attribute Mismatch

  • Symptom: Visual test fails with theme-related differences
  • Cause: Theme attribute not set correctly in template
  • Solution: Ensure nve-theme attribute matches test name

    

Viewport Size Issues

  • Symptom: Screenshots show different dimensions than expected
  • Cause: Content overflows or viewport not consistent
  • Solution: Use explicit containers or adjust viewport in test config

    

Acceptable Diff Threshold

Default: maxDiffPercentage < 1

Visual differences under 1% are acceptable due to:

  • Sub-pixel rendering variations
  • Font rendering differences across OS
  • Anti-aliasing variations

If diff exceeds 1%, investigate actual visual change or update baseline.

Lighthouse Failures

Performance Score Below 100

  • Causes:

    • Bundle size too large
    • Unoptimized images
    • Blocking resources
    • Excessive JavaScript execution
  • Solutions:


    
  • Bundle Size Guidelines:
    • Simple components: < 12 KB
    • Interactive components: < 18 KB
    • Complex components: < 25 KB
    • Rich editors/specialized: Document in test

Accessibility Score Below 100

  • Common Issues:

    • Missing ARIA labels
    • Insufficient color contrast
    • Missing focus indicators
    • Invalid ARIA attributes
  • Solution: Run accessibility tests and fix violations


    

See accessibility testing guide for details.

Best Practices Score Below 100

  • Common Issues:

    • Console errors in production
    • Deprecated APIs usage
    • Missing error handling
    • Inefficient patterns
  • Solution: Review Lighthouse report details and fix issues

Build Failures

Wireit Cache Issues

  • Symptom: Build fails with outdated errors or missing dependencies
  • Cause: Stale Wireit cache
  • Solution: Reset CI environment

    

This clears all caches and reinstalls dependencies.

TypeScript Compilation Errors

  • Symptom: Type errors in CI but not locally
  • Cause: Different TypeScript version or stale build cache
  • Solutions:

    

Git LFS Issues

Missing Visual Test Baselines

  • Symptom: Visual tests fail with "baseline not found"
  • Cause: Git LFS files not pulled
  • Solution: Pull LFS files

    

Development Environment

Node Version Mismatch

  • Symptom: Build or tests fail with Node compatibility errors
  • Cause: Wrong Node.js version
  • Solution: Use Node Version Manager

    

pnpm Version Issues

  • Symptom: Install fails or lockfile changes unexpectedly
  • Cause: Wrong pnpm version
  • Solution: Use Corepack

    

Port Conflicts in Dev Mode

  • Symptom: Dev server fails to start with "port already in use"
  • Cause: Another process using the port
  • Solution:

    

Performance Regressions

Test Suite Running Slowly

  • Symptom: Tests take much longer than before
  • Causes & Solutions:
  1. Too many fixture creations

    
  1. Missing test parallelization

    
  1. Unnecessary elementIsStable() calls

    

Build Time Regression

Symptom: CI builds take much longer than expected Causes & Solutions:

  1. Wireit cache not working
  • Check files and output arrays are accurate
  • Verify no gitignored files in files array
  1. Missing dependency parallelization
  • Review Wireit dependencies in package.json
  • Ensure independent tasks don't list each other as dependencies
  1. Large bundle sizes
  • Check for accidental bundling of dev dependencies
  • Use bundle analyzer: ANALYZE=true pnpm run build

CI/CD Issues

Pipeline Timeout

  • Symptom: CI job exceeds time limit
  • Cause: Hung tests or infinite loops
  • Solution: Add timeouts to tests

    

Getting Help

When troubleshooting:

  1. Check CI logs - Full error messages often in collapsed sections
  2. Reproduce locally - Run exact CI command locally
  3. Compare with working example - Check similar components/projects
  4. Review recent changes - Use git diff main to see what changed
  5. Clear all caches - pnpm run ci:reset eliminates cache issues