---
title: What can I do when I run into build output limits with Next.js on Vercel?
description: Learn how to work with build output limits for Next.js on Vercel.
url: "https://vercel.com/kb/guide/what-can-i-do-when-i-run-into-build-output-limits-with-next-js-on-vercel"
published: 2025-11-03
last_updated: 2025-11-10
authors: Allen Hai
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

You might have learned about [Next.js' static data-fetching properties](https://nextjs.org/docs/basic-features/data-fetching/get-static-props) and immediately proceeded to create a new static site that reads from [CMS](https://vercel.com/docs/solutions/cms) entries.

For larger sites, you may have run into a [limit](https://vercel.com/docs/platform/limits#files) that mentioned exceeding the maximum number of build outputs. Read on to learn how you can work within the constraints of platform limitations.

## Fallback Pages

If you have a large number of pages that need to get generated (more than 1000), it's worth considering the option of rendering a fallback page and lazily building pages on-demand as they are requested.

This will not only minimize the number of initial build outputs, but it can also significantly speed up your builds. In your `getStaticPaths` function, you can add `fallback: true` to the returned object as shown below:

```javascript
export async function getStaticPaths() {
  return {
    paths: [
      { params: { ... } } 
    ],
    fallback: true or false 
  };
}
```

Enabling the fallback option will initially show your site visitors a loading state that you can customize while rendering your page in the background. Once the page is rendered, it will be persisted and cached for all your future visitors.

You might be concerned that this may negatively impact your SEO, but modern search engines are sophisticated enough to understand JavaScript and are able to crawl the content accordingly. If you prefer to delay the entire response until your page has been fully rendered, you can use the blocking option by returning `fallback: 'blocking'` instead of `fallback: true`.

## Related Documentation

- [Next.js](/docs/frameworks/full-stack/nextjs)

## More Next.js guides

- [Migrate self-hosted Next.js and containers from AWS to Vercel](/kb/guide/migrate-containers-from-aws-to-vercel): Migrate Next.js apps and HTTP containers from AWS to Vercel. Configure AWS access, assess background workers, and plan testing, DNS cutover, and rollback.
- [Migrate a Next.js app from Webflow Cloud to Vercel](/kb/guide/migrate-a-next-js-app-from-webflow-cloud-to-vercel): Move your Next.js app from Webflow Cloud to Vercel: remove the OpenNext Cloudflare adapter, drop the base path, map storage bindings to Vercel Blob, Redis, and Postgres, and deploy with Git or the vercel CLI.
- [How to revalidate Sitecore pages on publish with Next.js](/kb/guide/update-sitecore-content-manually): Learn how to use a Sitecore Experience Edge webhook and Next.js revalidatePath to refresh cached Sitecore Content SDK pages after each publish.