{"record":{"id":"faca7f31090c0d3d","repo":"quasarframework/quasar","slug":"spa-mode-is-included-by-default-no-need-to-add-or","errorCode":null,"errorMessage":"SPA mode is included by default. No need to add or remove it.","messagePattern":"SPA mode is included by default\\. No need to add or remove it\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"app-vite/lib/cmd/mode.js","lineNumber":88,"sourceCode":"import { green, gray } from 'kolorist'\n\nimport { getCtx } from '../utils/get-ctx.js'\nimport { generateTypes } from '../types-generator.js'\nimport { isModeInstalled, ssrWebservers } from '../modes/modes-utils.js'\n\nasync function run() {\n  const [action, mode] = argv._\n  const ctx = getCtx({ mode: 'spa' })\n\n  if (!['add', 'remove'].includes(action)) {\n    console.log()\n    warn(`Unknown action specified (${action}).`)\n    showHelp()\n    process.exit(1)\n  }\n\n  if (mode === 'spa') {\n    warn('SPA mode is included by default. No need to add or remove it.')\n    process.exit(1)\n  }\n\n  if (\n    ![\n      void 0,\n      'pwa',\n      'cordova',\n      'capacitor',\n      'electron',\n      'ssr',\n      'ssg',\n      'bex'\n    ].includes(mode)\n  ) {\n    fatal(`Unknown mode \"${mode}\" to ${action}`)\n  }\n","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/cmd/mode.js#L70-L106","documentation":"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.","triggerScenarios":"Running `quasar mode add spa` or `quasar mode remove spa` (mode.js run(), the `mode === 'spa'` branch).","commonSituations":"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.","solutions":["Remove 'spa' from the command or the list of modes being added/removed — SPA needs no setup.","If you intended a different mode, specify pwa|ssr|ssg|bex|cordova|capacitor|electron instead.","Check `quasar mode` (no arguments) to see which optional modes are already installed."],"exampleFix":"// before\nquasar mode add spa\n// after\nquasar mode add ssr   # or just build/dev for the default SPA mode","handlingStrategy":"validation","validationCode":"const OPTIONAL_MODES = ['pwa','ssr','ssg','bex','cordova','capacitor','electron'];\nif (modes.includes('spa')) throw new Error('spa is the default mode; remove it from setup scripts');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep 'spa' out of mode add/remove lists in scripts — it is implicit.","Run `quasar mode` to inspect installed modes before mutating them.","Update legacy scripts from pre-SPA-default tutorials."],"tags":["cli","spa-mode","invalid-argument"],"backgroundTag":"spa-mode-not-addable","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}