quasarframework/quasar · error

Unknown action specified (${action}).

Error message

Unknown action specified (${action}).

What it means

'quasar mode <action> <mode>' only supports add and remove as actions. Any other first parameter prints this warning, shows help, and exits with code 1. (Note that 'spa' is additionally rejected downstream since it's always included.)

Source

Thrown at app-vite/lib/cmd/mode.js:82

  console.log()
  warn(`Wrong number of parameters (${argv._.length}).`)
  showHelp()
  process.exit(1)
}

import { green, gray } from 'kolorist'

import { getCtx } from '../utils/get-ctx.js'
import { generateTypes } from '../types-generator.js'
import { isModeInstalled, ssrWebservers } from '../modes/modes-utils.js'

async function run() {
  const [action, mode] = argv._
  const ctx = getCtx({ mode: 'spa' })

  if (!['add', 'remove'].includes(action)) {
    console.log()
    warn(`Unknown action specified (${action}).`)
    showHelp()
    process.exit(1)
  }

  if (mode === 'spa') {
    warn('SPA mode is included by default. No need to add or remove it.')
    process.exit(1)
  }

  if (
    ![
      void 0,
      'pwa',
      'cordova',
      'capacitor',
      'electron',
      'ssr',
      'ssg',

View on GitHub (pinned to 4841521b5f)

Solutions

  1. Use 'quasar mode add <mode>' to enable a mode (e.g. add ssr, pwa, electron, capacitor, cordova, bex).
  2. Use 'quasar mode remove <mode>' to disable it.
  3. Run 'quasar mode --help' to see the accepted actions.
  4. Remember spa cannot be added/removed — it's always enabled.

Example fix

// before
quasar mode enable ssr
// after
quasar mode add ssr
Defensive patterns

Strategy: validation

Validate before calling

const VALID = ['add', 'remove'];
if (!VALID.includes(action)) {
  throw new Error(`Invalid mode action '${action}'. Use: ${VALID.join(', ')}`);
}

Type guard

const isModeAction = (a) => ['add', 'remove'].includes(a);

Prevention

When it happens

Trigger: Running 'quasar mode install ssr', 'quasar mode enable pwa', or a typo like 'quasar mode adde electron'.

Common situations: npm-style verbs from habit, typos, or following outdated tutorials that used different verbs.

Related errors


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