{"record":{"id":"363153844d3a5295","repo":"vercel/next.js","slug":"error-for-page-page-pages-with-getserversidep","errorCode":null,"errorMessage":"Error for page ${page}: pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export","messagePattern":"Error for page (.+?): pages with `getServerSideProps` can not be exported\\. See more info here: https://nextjs\\.org/docs/messages/gssp-export","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/export/routes/pages.ts","lineNumber":49,"sourceCode":"  res: MockedResponse,\n  path: string,\n  page: string,\n  query: NextParsedUrlQuery,\n  params: Params | undefined,\n  htmlFilepath: string,\n  htmlFilename: string,\n  pagesDataDir: string,\n  buildExport: boolean,\n  isDynamic: boolean,\n  sharedContext: PagesSharedContext,\n  renderContext: PagesRenderContext,\n  hasOrigQueryValues: boolean,\n  renderOpts: RenderOpts,\n  components: LoadComponentsReturnType,\n  fileWriter: MultiFileWriter\n): Promise<ExportRouteResult | undefined> {\n  if (components.getServerSideProps) {\n    throw new Error(`Error for page ${page}: ${SERVER_PROPS_EXPORT_ERROR}`)\n  }\n\n  // for non-dynamic SSG pages we should have already\n  // prerendered the file\n  if (!buildExport && components.getStaticProps && !isDynamic) {\n    return\n  }\n\n  // Pages router merges page params (e.g. [lang]) with query params\n  // primarily to support them both being accessible on `useRouter().query`.\n  // If we extracted dynamic params from the path, we need to merge them\n  // back into the query object.\n  const searchAndDynamicParams = {\n    ...query,\n    ...params,\n  }\n\n  if (components.getStaticProps && !htmlFilepath.endsWith('.html')) {","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/export/routes/pages.ts#L31-L67","documentation":"Static-export incompatibility check in exportPagesPage: the page being exported defines getServerSideProps, which requires a per-request Node server. next export cannot execute it, so export is refused up front rather than silently emitting a page with missing props.","triggerScenarios":"Exporting a pages/ page that defines getServerSideProps.","commonSituations":"Running next export on an app that still uses getServerSideProps.","solutions":["Remove getServerSideProps from the page, or drop output: export."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}