quasarframework/quasar · error
ERR_PARSE_ARGS_UNKNOWN_OPTION
ERR_PARSE_ARGS_UNKNOWN_OPTION
Error message
Unknown error while parsing arguments
What it means
app-vite's get-argv wraps Node's util.parseArgs. When parsing CLI flags throws, the wrapper returns a sentinel argv whose __warn() function prints either the parseArgs message (for ERR_PARSE_ARGS_UNKNOWN_OPTION, i.e. an unrecognized option) or this generic fallback, then exits 1. It exists so callers can uniformly handle bad CLI input via `if (argv.help)`-style checks.
Source
Thrown at app-vite/lib/utils/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 the command with `--help` to see the exact supported options for that subcommand
- Fix or remove the unrecognized flag; check spelling (`--port` not `--pot`)
- Check the Quasar docs for the current option names — flags change between major versions
- Quote values containing spaces or special characters so they don't parse as extra options
Example fix
// before quasar dev --pot 9000 // after quasar dev --port 9000
Defensive patterns
Strategy: validation
Validate before calling
// pre-check flags against the command's help output before scripting it
const { execSync } = require('node:child_process')
const help = execSync('quasar dev --help').toString()
const flag = '--port'
if (!help.includes(flag)) {
throw new Error(`Flag ${flag} is not supported by 'quasar dev'`)
} Prevention
- Always check `quasar <cmd> --help` before using a flag you haven't used recently
- Don't mix flags between subcommands or between Quasar packages (app-vite vs cli vs icongenie)
- Quote argument values containing spaces or special characters
- Pin and read the docs for your installed Quasar version; option names change between majors
When it happens
Trigger: Invoking any `quasar`/app-vite dev-mode command with an option that is not registered in that command's parseArgs configuration — e.g. a typo like `--pot 9000` instead of `--port 9000`, or an unknown shorthand — triggers ERR_PARSE_ARGS_UNKNOWN_OPTION which is reported through this handler; the generic message appears for any other parse failure.
Common situations: Typos in long flags; using an option from a different command (e.g. passing an icongenie-only flag to `quasar dev`); copy-pasted flags from blog posts for older Quasar versions; unquoted values that split into extra tokens.
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/d400ce1a4e62d1c8.
Report an issue: GitHub.