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
- Use 'quasar mode add <mode>' to enable a mode (e.g. add ssr, pwa, electron, capacitor, cordova, bex).
- Use 'quasar mode remove <mode>' to disable it.
- Run 'quasar mode --help' to see the accepted actions.
- 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
- Only 'add' and 'remove' are valid mode actions.
- Remember spa is built-in and cannot be added/removed.
- Run 'quasar mode --help' before scripting unusual actions.
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
- Unknown action specified (${action}).
- Wrong number of parameters (${argv._.length}).
- Wrong number of parameters (${argv._.length}).
- App Extension has no command called "${cmd}"
- ERR_PARSE_ARGS_UNKNOWN_OPTION
AI-assisted analysis of quasarframework/quasar@4841521b5f (2026-08-30).
Data as JSON: /api/errors/d86ba05fd1085be6.
Report an issue: GitHub.