quasarframework/quasar · error

ERR_PARSE_ARGS_UNKNOWN_OPTION

ERR_PARSE_ARGS_UNKNOWN_OPTION

Error message

Unknown error while parsing arguments

What it means

icongenie's get-argv wraps util.parseArgs for commands like `icongenie generate`/`profile`. On parse failure, __warn logs the full error, prints the parseArgs message for ERR_PARSE_ARGS_UNKNOWN_OPTION (unknown flag) or this generic fallback, and exits 1. This is icongenie's variant of the shared get-argv pattern across Quasar packages.

Source

Thrown at icongenie/lib/utils/get-argv.js:37

export function getArgv(options, { strict = true } = {}) {
  try {
    const { values, positionals } = parseArgs({
      options,
      strict,
      allowPositionals: true
    })

    return { ...parseValues(values), _: positionals }
  } catch (err) {
    return {
      help: true,
      _: [],

      // Should be handled if (argv.help) in the caller
      __warn() {
        console.error(err)
        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

  1. Run `icongenie --help` or `icongenie generate --help` for the exact option list
  2. Fix the typo or remove the unsupported flag (e.g. --qualty -> --quality)
  3. Verify flags against current icongenie docs for your installed version
  4. Quote paths/values containing spaces so tokens parse correctly

Example fix

// before
icongenie generate --qualty 90
// after
icongenie generate --quality 90
Defensive patterns

Strategy: validation

Validate before calling

// check icongenie's accepted options before invoking
const { execSync } = require('node:child_process')
const help = execSync('icongenie generate --help').toString()
const flag = '--quality'
if (!help.includes(flag)) {
  throw new Error(`Flag ${flag} is not supported by 'icongenie generate'`)
}

Prevention

When it happens

Trigger: Invoking icongenie with a flag not registered for that subcommand — e.g. `icongenie generate --qualty 90` (typo for --quality) or a profile-related flag on the wrong subcommand.

Common situations: Typos in long option names; reusing flags from `quasar dev` or other packages; stale flags from older icongenie versions documented in old tutorials; copy-paste errors that merge two flags together.

Related errors


AI-assisted analysis of quasarframework/quasar@4841521b5f (2026-08-30). Data as JSON: /api/errors/ab3702448c1f6e82. Report an issue: GitHub.