vercel/next.js · error · Error

getStaticPaths was added without a getStaticProps in ${pathn

Error message

getStaticPaths was added without a getStaticProps in ${pathname}. Without getStaticProps, getStaticPaths does nothing

What it means

Guard in renderToHTMLImpl: getStaticPaths is exported but the page is not SSG (no getStaticProps/getStaticProps data-fetching is present), so the paths getStaticPaths enumerates are never consumed. The check fires because getStaticPaths only takes effect when paired with getStaticProps on the same page.

Source

Thrown at packages/next/src/server/render.tsx:602

  if (getServerSideProps && isSSG) {
    throw new Error(SERVER_PROPS_SSG_CONFLICT + ` ${pathname}`)
  }

  if (getServerSideProps && renderOpts.nextConfigOutput === 'export') {
    throw new Error(
      'getServerSideProps cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export'
    )
  }

  if (getStaticPaths && !pageIsDynamic) {
    throw new Error(
      `getStaticPaths is only allowed for dynamic SSG pages and was found on '${pathname}'.` +
        `\nRead more: https://nextjs.org/docs/messages/non-dynamic-getstaticpaths-usage`
    )
  }

  if (!!getStaticPaths && !isSSG) {
    throw new Error(
      `getStaticPaths was added without a getStaticProps in ${pathname}. Without getStaticProps, getStaticPaths does nothing`
    )
  }

  if (isSSG && pageIsDynamic && !getStaticPaths) {
    throw new Error(
      `getStaticPaths is required for dynamic SSG pages and is missing for '${pathname}'.` +
        `\nRead more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`
    )
  }

  let asPath: string = renderOpts.resolvedAsPath || (req.url as string)

  if (process.env.__NEXT_DEV_SERVER) {
    const { isValidElementType } =
      require('next/dist/compiled/react-is') as typeof import('next/dist/compiled/react-is')
    if (!isValidElementType(Component)) {
      throw new Error(

View on GitHub (pinned to 89d017eac4)

Solutions

  1. Add a `getStaticProps` export alongside `getStaticPaths`, or remove `getStaticPaths` since it has no effect without it.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/next/src/server/render.tsx:604 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of vercel/next.js@89d017eac4 (2026-08-19). Data as JSON: /api/errors/0a0829fdcfbff9b6. Report an issue: GitHub.