{"record":{"id":"82079b5ada3c3cfb","repo":"quasarframework/quasar","slug":"failed-to-render-errorsencountered-ssg-page-er","errorCode":null,"errorMessage":"Failed to render ${errorsEncountered} SSG page${errorsEncountered > 1 ? 's' : ''}.","messagePattern":"Failed to render (.+?) SSG page(.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app-vite/lib/modes/ssg/ssg-builder.js","lineNumber":706,"sourceCode":"          threadsNumber: ssgRendererConcurrency\n        }\n      )\n    } else {\n      for (const ssgPage of ssgPageList) {\n        await renderPage(ssgPage)\n      }\n    }\n\n    if (errorsEncountered) {\n      if (!['warn', 'ignore'].includes(onSsgRendererError)) {\n        fatal(\n          `Failed to render ${errorsEncountered} SSG page${errorsEncountered > 1 ? 's' : ''}. Check details above.`,\n          'FAIL'\n        )\n      }\n\n      console.log()\n      warn(\n        `Failed to render ${errorsEncountered} SSG page${errorsEncountered > 1 ? 's' : ''}.`,\n        'WARNING!'\n      )\n      console.log()\n    }\n\n    await this.removeFile('__ssg__')\n\n    if (errorsEncountered) {\n      const renderedCount = ssgPageList.length - errorsEncountered\n      done({\n        target:\n          ` ${renderedCount}/${ssgPageList.length} SSG page` +\n          `${renderedCount > 1 ? 's' : ''}${concurrencyBanner}`\n      })\n    } else {\n      done()\n    }","sourceCodeStart":688,"sourceCodeEnd":724,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/modes/ssg/ssg-builder.js#L688-L724","documentation":"At the end of #renderSsgPages, if any SSG pages failed to render, the build emits a FAIL line with the count and this prominent warning summarizing how many pages could not be rendered. Details for each page were already printed earlier by the renderer error handler.","triggerScenarios":"One or more routes threw during the SSG pre-render phase (nonzero errorsEncountered), e.g. due to SSR-incompatible code or failing async data on specific routes.","commonSituations":"Migrating an SPA to SSG where several pages touch window/localStorage at module scope; a batch of dynamic routes failing due to a shared data-fetching bug; prerender timeout on heavy pages.","solutions":["Scroll up to the per-page 'Render error' output to see each failing page and its stack","Fix the shared root cause (usually browser-only code or a failing fetch) in the listed pages","Set build.ssg.exclude for routes that genuinely cannot be pre-rendered","Re-run the SSG build and confirm the failed-page count drops to zero"],"exampleFix":"// before (quasar.config.js)\nssg: { exclude: [] }\n// after\nssg: { exclude: ['/problematic-route'] }","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"// treat SSG build result as partial\nconst failedPages = collectRenderErrors()\nif (failedPages.length > 0) {\n  console.error(`Fix or exclude: ${failedPages.join(', ')}`)\n  process.exitCode = 1 // fail CI so partial output isn't shipped\n}","preventionTips":["Inspect the per-page 'Render error' details printed before this summary","Keep a build.ssg.exclude list for routes that legitimately cannot prerender","Run SSG builds in CI so new browser-only code fails fast","Fix SSR-incompatible libraries or lazy-load them client-side"],"tags":["ssg","build","prerender"],"backgroundTag":"ssg-page-render-failed","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}