quasarframework/quasar · warning

SPA mode is included by default. No need to add or remove it

Error message

SPA mode is included by default. No need to add or remove it.

What it means

The `quasar mode` command refuses to act on the 'spa' mode because SPA is Quasar's default build mode and is always present — it cannot be added or removed. The CLI prints this warning and exits with code 1. It is an informational guard against a pointless command, not a failure of any operation.

Source

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

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',
      'bex'
    ].includes(mode)
  ) {
    fatal(`Unknown mode "${mode}" to ${action}`)
  }

View on GitHub (pinned to 4841521b5f)

Solutions

  1. Remove 'spa' from the command or the list of modes being added/removed — SPA needs no setup.
  2. If you intended a different mode, specify pwa|ssr|ssg|bex|cordova|capacitor|electron instead.
  3. Check `quasar mode` (no arguments) to see which optional modes are already installed.

Example fix

// before
quasar mode add spa
// after
quasar mode add ssr   # or just build/dev for the default SPA mode
Defensive patterns

Strategy: validation

Validate before calling

const OPTIONAL_MODES = ['pwa','ssr','ssg','bex','cordova','capacitor','electron'];
if (modes.includes('spa')) throw new Error('spa is the default mode; remove it from setup scripts');

Prevention

When it happens

Trigger: Running `quasar mode add spa` or `quasar mode remove spa` (mode.js run(), the `mode === 'spa'` branch).

Common situations: Following an outdated tutorial that predates SPA-by-default behavior; scripting mode setup generically and iterating over a list that includes 'spa'; habitually running `mode add <mode>` for every mode the project uses.

Related errors


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