Lighthouse requires Node.js 22 (LTS) or later. Run
node --version to check.Install Lighthouse
Install the Verify the installation:
lighthouse package globally using npm or Yarn.Run your first audit
Point Lighthouse at any URL. Chrome launches automatically, loads the page, collects data, and exits.By default, Lighthouse audits all four categories (Performance, Accessibility, SEO, Best Practices) using simulated mobile throttling.
View the HTML report
Unless you specify otherwise, Lighthouse saves an HTML report to a file in the current directory:Open this file in any browser to see your scores, metric values, and actionable recommendations for every failing audit.You can also upload any
.report.json file to the Lighthouse Viewer to view and share reports online.Common flags
| Flag | Description |
|---|---|
--view | Open the HTML report in a browser after the run completes |
--output | Report format: html, json, or csv (repeatable) |
--output-path | File path for the report output |
--only-categories | Comma-separated list of categories to audit |
--preset | Use a built-in config: perf, desktop, or experimental |
--quiet | Suppress progress and log output |
--chrome-flags | Pass custom flags to the Chrome process |
lighthouse --help to see all available options.