quasarframework/quasar · error
ERR_PARSE_ARGS_UNKNOWN_OPTION
ERR_PARSE_ARGS_UNKNOWN_OPTION
Error message
Unknown error while parsing arguments
What it means
The Quasar CLI's get-argv wraps util.parseArgs the same way as app-vite: on a parse failure it returns a sentinel argv whose __warn() prints the parseArgs message for ERR_PARSE_ARGS_UNKNOWN_OPTION (an unrecognized flag) or this generic fallback, then exits 1. It applies to all `quasar` CLI subcommands' argument parsing.
Source
Thrown at cli/lib/get-argv.js:20
import { warn } from './logger.js'
export function getArgv(options, { strict = true } = {}) {
try {
const { values, positionals } = parseArgs({
options,
strict,
allowPositionals: true
})
return { ...values, _: positionals }
} catch (err) {
return {
help: true,
_: [],
// Should be handled if (argv.help) in the caller
__warn() {
warn(
err?.code === 'ERR_PARSE_ARGS_UNKNOWN_OPTION'
? err.message
: 'Unknown error while parsing arguments'
)
warn()
process.exit(1)
}
}
}
}
View on GitHub (pinned to 4841521b5f)
Solutions
- Run `quasar <cmd> --help` (or `quasar help <cmd>`) to list valid options
- Correct or remove the unknown flag; verify the flag belongs to that subcommand
- Consult the current Quasar CLI docs — option sets differ between commands and versions
- Quote or escape values with spaces/special characters
Example fix
// before quasar build --dev // after quasar build // or: quasar dev
Defensive patterns
Strategy: validation
Validate before calling
// validate flags before scripting quasar CLI calls
const { execSync } = require('node:child_process')
const help = execSync('quasar build --help').toString()
const flag = '--mode'
if (!help.includes(flag)) {
throw new Error(`Flag ${flag} is not supported by 'quasar build'`)
} Prevention
- Run `quasar <cmd> --help` or `quasar help <cmd>` before using unfamiliar flags
- Verify each flag belongs to the exact subcommand you're invoking
- Watch for flag changes when upgrading Quasar CLI major versions
- Quote values with spaces (e.g. `--theme "my theme"`) so tokens parse correctly
When it happens
Trigger: Passing an option unknown to the chosen `quasar <cmd>` subcommand (e.g. `quasar build --dev`), or any other unexpected parseArgs rejection (malformed flag syntax like `--=value`).
Common situations: Typos in flags; mixing options between subcommands (`quasar dev` options used with `quasar build`); outdated docs/blog flags for older CLI versions; shorthand typos like `-P` instead of `-p`.
Related errors
- ERR_PARSE_ARGS_UNKNOWN_OPTION
- ERR_PARSE_ARGS_UNKNOWN_OPTION
- Wrong number of parameters (${argv._.length}).
- Wrong number of parameters (${argv._.length}).
- Unknown action specified (${action}).
AI-assisted analysis of quasarframework/quasar@4841521b5f (2026-08-30).
Data as JSON: /api/errors/562dba21df6b8f94.
Report an issue: GitHub.