quasarframework/quasar · warning

Render error for the above SSG page:

Error message

Render error for the above SSG page:

What it means

During SSG builds, when a page fails to render, Quasar calls the handler from getSsgRendererErrorHandler. If build.ssg.onRendererError is set to 'warn' (the non-fatal mode), it prints the failing page definition, the render error, and this warning header before the failure summary, then continues the build leaving that page unrendered.

Source

Thrown at app-vite/lib/modes/ssg/ssg-builder.js:69

      console.log()
      error('SSG build failed to render SSG page:')
      console.error(ssgPage)
      error('Render error for the above SSG page:')
      console.error(err)
      error(
        `Failed to render SSG page for ${getSsgPageIdentifier(ssgPage)}.` +
          (reason ? ` ${reason}.` : '') +
          ' Check details above.'
      )
    }
  }

  if (onSsgRendererError === 'warn') {
    return ({ err, reason, ssgPage }) => {
      console.log()
      warn('SSG build failed to render SSG page:')
      console.warn(ssgPage)
      warn('Render error for the above SSG page:')
      console.warn(err)
      warn(
        `Failed to render SSG page for ${getSsgPageIdentifier(ssgPage)}.` +
          (reason ? ` ${reason}.` : '') +
          ' Check details above.'
      )
    }
  }

  if (onSsgRendererError === 'ignore') {
    return () => {}
  }

  fatal(
    'Invalid value for quasar.config.ssg.onSsgRendererError:' +
      `"${onSsgRendererError}". Must be one of: "abort", "error",` +
      ' "warn", "ignore" or a function.',
    'FAIL'

View on GitHub (pinned to 4841521b5f)

Solutions

  1. Inspect the render error printed under this warning (console.warn(err)) for the real stack
  2. Fix browser-only API usage in the failing page (guard with process.env.CLIENT or move to onMounted)
  3. Add the problematic route to build.ssg.exclude if it cannot be pre-rendered
  4. Fix or provide data for the failing dynamic route parameter

Example fix

// before
export default { mounted() {}, setup() { document.title = 'x' } }
// after
export default {
  setup() {
    if (process.env.CLIENT) document.title = 'x'
  }
}
Defensive patterns

Strategy: validation

Validate before calling

// before building SSG, check routes for browser-only usage
if (process.env.SERVER) {
  if (typeof window !== 'undefined') {
    throw new Error('Page code touches window during prerender')
  }
}

Try / catch

try {
  await renderPage(ssgPage)
} catch (err) {
  console.error(`SSG render failed for ${ssgPage}`)
  // add to build.ssg.exclude or fix the browser-only code
}

Prevention

When it happens

Trigger: A specific SSG page throws during pre-render (route render crashes in the renderer) while ssg.onRendererError: 'warn' is configured; also used for fallbackRouteParams pages that fail.

Common situations: Page component assumes browser-only APIs (window/document) during pre-render; a route with dynamic params throws for a particular param value; async data fetch fails for one route; SSR-incompatible library imported by that page.

Related errors


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