stablyai/orca · error
--plugin-catalog requires a JSON catalog path
Error message
--plugin-catalog requires a JSON catalog path
What it means
Thrown by the localization catalog verification script's argument parser when --plugin-catalog is passed but the next argument is either missing (end of argv) or is itself another flag (starts with --). The parser expects --plugin-catalog to be immediately followed by a JSON file path, or alternatively used as --plugin-catalog=<path>.
Source
Thrown at config/scripts/verify-localization-catalog.mjs:388
if (genericTermRegressions.length > 20) {
console.error(`...and ${genericTermRegressions.length - 20} more generic term regressions`)
}
}
return 1
}
console.log(`Verified ${localeEntries.size} existing ${localeName}.json entries.`)
return 0
}
function parseArgs(argv) {
const pluginCatalogs = []
for (let index = 0; index < argv.length; index += 1) {
const argument = argv[index]
if (argument === '--plugin-catalog') {
const catalogPath = argv[index + 1]
if (!catalogPath || catalogPath.startsWith('--')) {
throw new Error('--plugin-catalog requires a JSON catalog path')
}
pluginCatalogs.push(catalogPath)
index += 1
} else if (argument.startsWith('--plugin-catalog=')) {
pluginCatalogs.push(argument.slice('--plugin-catalog='.length))
}
}
return {
fix: argv.includes('--fix'),
pluginCatalogs
}
}
async function reportPluginCatalog(root, catalog, pluginCatalogPath) {
const resolvedPath = path.resolve(root, pluginCatalogPath)
let pluginCatalog
try {
pluginCatalog = JSON.parse(await fs.readFile(resolvedPath, 'utf8'))View on GitHub (pinned to 1136503c6a)
Solutions
- Provide the JSON catalog path immediately after --plugin-catalog: node config/scripts/verify-localization-catalog.mjs --plugin-catalog path/to/catalog.json
- Alternatively use the equals form which is self-contained: --plugin-catalog=path/to/catalog.json
- If constructing the command in CI, ensure the path variable is non-empty before appending the flag, or use the equals form to avoid positional ambiguity.
Example fix
// before (CI script with potentially empty variable)
// node config/scripts/verify-localization-catalog.mjs --plugin-catalog ${CATALOG_PATH}
//
// after (guard against empty, use equals form)
// ARGS=""
// [ -n "$CATALOG_PATH" ] && ARGS="--plugin-catalog=$CATALOG_PATH"
// node config/scripts/verify-localization-catalog.mjs $ARGS Defensive patterns
Strategy: validation
Validate before calling
// Validate --plugin-catalog args before passing them to the script.
function buildCatalogArgs(catalogPaths) {
const valid = catalogPaths.filter((p) => p && !p.startsWith('--') && p.endsWith('.json'))
if (valid.length !== catalogPaths.length) {
throw new Error(
`Invalid catalog paths: ${catalogPaths.filter((p) => !valid.includes(p)).join(', ')}`
)
}
return valid.map((p) => `--plugin-catalog=${p}`)
} Prevention
- Always use the --plugin-catalog=<path> equals form in CI scripts to avoid positional ambiguity when variables are empty.
- In CI pipelines, guard dynamic command construction: only append --plugin-catalog when the path variable is non-empty.
- Add a quick pre-flight check that each catalog path exists as a .json file before invoking the script.
When it happens
Trigger: Calling the script with --plugin-catalog as the last argument with no path following it; placing another flag like --fix immediately after --plugin-catalog; misspelling the path as another flag name.
Common situations: A CI pipeline or Makefile constructs the command dynamically and omits the path variable when it's empty; a developer adds --plugin-catalog to the command but forgets the path argument; a shell quoting issue causes the path to be consumed or split incorrectly.
Related errors
- --higher-is-better requires a metric key
- Usage: node config/scripts/compare-benchmark-artifacts.mjs -
- Missing value for ${arg}
- Unknown argument: ${arg}
- --boundary must be child or worker
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/578274f43aa4b8f4.
Report an issue: GitHub.