quasarframework/quasar · warning

SSG support detected already. Aborting.

Error message

SSG support detected already. Aborting.

What it means

Warning emitted by `quasar mode add ssg` when SSG support is already installed. addMode detects the existing mode via isModeInstalled(appPaths, 'ssg'), optionally refreshes its dependencies (with forced reinstall when needed), warns, and returns without re-scaffolding. A controlled abort, not a failure.

Source

Thrown at app-vite/lib/modes/ssg/ssg-installation.js:27

  resolvePromptAnswer
} from '../modes-utils.js'

/**
 * @param {{
 *   ctx: import('../../../types/configuration/context').InternalQuasarContext,
 *   silent: boolean,
 *   filenameBasedRouting?: boolean
 * }} options
 */
export async function addMode({ ctx, silent, filenameBasedRouting }) {
  const { appPaths, cacheProxy } = ctx

  if (isModeInstalled(appPaths, 'ssg')) {
    const forceInstall = await ensureModePackageJsonAndWorkspace('ssg', ctx)
    await ensureModeDeps('ssg', ctx, forceInstall)

    if (silent !== true) {
      warn('SSG support detected already. Aborting.')
    }

    return
  }

  const promptSession = await createPromptSession('Installing SSG Mode...')

  const scope = {
    filenameBasedRouting: await resolvePromptAnswer({
      promptSession,
      value: filenameBasedRouting,
      fallback: false,
      fallbackNote: 'Scaffolding for filename-based routing NOT being used.',
      question: () =>
        promptSession.confirm({
          message: `Are you using filename-based routing?`,
          initialValue: false
        })

View on GitHub (pinned to 4841521b5f)

Solutions

  1. No fix needed — proceed with `quasar dev -m ssg` or `quasar build -m ssg`.
  2. If src-ssg dependencies are stale, force a dependency refresh so ensureModeDeps reinstalls them.
  3. If src-ssg is corrupted or partial, delete it and run `quasar mode add ssg` again.
Defensive patterns

Strategy: validation

Validate before calling

import { existsSync } from 'node:fs'
import { join } from 'node:path'
if (!existsSync(join(process.cwd(), 'src-ssg'))) {
  await execa('quasar', ['mode', 'add', 'ssg'])
}
await execa('quasar', ['build', '-m', 'ssg'])

Prevention

When it happens

Trigger: Running `quasar mode add ssg` when the project already contains src-ssg. Also fires when dev/build commands with the SSG mode internally invoke addMode on an already-configured project and silent is not true.

Common situations: Re-running the add command after a previous install; CI scripts or templates that run `quasar mode add ssg` unconditionally; running `quasar dev -m ssg` on an already SSG-enabled project.

Related errors


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