{"record":{"id":"dcf88f90d4fa5d39","repo":"GoogleChrome/lighthouse","slug":"no-directory-provided-nusage-0-lhr-directory","errorCode":null,"errorMessage":"No directory provided\\nUsage: $0 <lhr directory> <audit id>","messagePattern":"No directory provided\\\\nUsage: \\$0 <lhr directory> <audit id>","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/scripts/gcp-collection/analyze-lhr-data.js","lineNumber":21,"sourceCode":"/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview This script takes the directory (of extracted batch LHR data) along with an audit id and generates\n * a JSON file with aggregated data for that audit.\n *\n * USAGE: node core/scripts/gcp-collection/analyze-lhr-data.js [<directory of lhr data>] [<audit id>]\n */\n\nimport {readdirSync, readFileSync} from 'fs';\nimport {join} from 'path';\n\nconst directory = process.argv[2];\nconst audit = process.argv[3];\nif (!directory) throw new Error('No directory provided\\nUsage: $0 <lhr directory> <audit id>');\n\nif (!audit) throw new Error('No audit provided\\nUsage: $0 <lhr directory> <audit id>');\n\nconst urlDirs = readdirSync(directory, {withFileTypes: true})\n.filter(dirent => dirent.isDirectory());\n\nconst passSet = new Set();\nconst failSet = new Set();\nconst runResults = [];\n\nfor (const dir of urlDirs) {\n  const url = dir.name;\n  const path = join(directory, url);\n  const runs = readdirSync(path, {withFileTypes: true});\n  const entry = {\n    url,\n    /** @type {Array<any>} */\n    runs: [],","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/GoogleChrome/lighthouse/blob/9515cd4e58ebed69f78742d932b501c2cab8ad8f/core/scripts/gcp-collection/analyze-lhr-data.js#L3-L39","documentation":"Error \"No directory provided\\nUsage: $0 <lhr directory> <audit id>\" thrown in GoogleChrome/lighthouse.","triggerScenarios":"Raised when the analyze-lhr-data script is invoked without the LHR directory argument.","commonSituations":"See trigger scenarios.","solutions":["Pass the LHR directory as the first argument: node analyze-lhr-data.js <lhr directory> <audit id>."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9515cd4e58ebed69f78742d932b501c2cab8ad8f","analyzedAt":"2026-08-13T06:28:10.346Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}