---
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

- [Build an AI Chat Agent with Weather API Tool Calling](/kb/guide/build-ai-agent-weather-api): Build an intelligent conversational agent that fetches real-time weather data using the AI SDK, tool calling, and a backend weather API powered by Express, FastAPI or Nitro
- [Human-in-the-Loop with Chat SDK and Workflow SDK](/kb/guide/human-in-the-loop-with-chat-sdk-and-workflow-sdk): Combine Chat SDK and Workflow SDK to suspend workflows on approval cards in a chat platform, then resume on click via createWebhook.
- [Build with Vercel Blob on Next.js](/kb/guide/vercel-blob-nextjs): Deploy the Vercel Blob Next.js Starter and learn how client uploads store images securely in a private Blob store.

## Reference Architecture

Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.

- [Agent stack](/kb/architecture/agents): Build and operate agents with models, tools, and durable workflows.
- [Web applications](/kb/architecture/web): Choose rendering, data, authentication, and caching approaches.
- [Backends](/kb/architecture/backends): Choose a runtime, connect services, and run background work.

[Browse all stacks](/kb/architecture)

## Build with prompts

Build an app, extend an agent, or improve your project with ready-to-use prompts for your coding agent.

[Browse the prompt library](/kb/prompts) · [Read the Markdown index](/kb/prompts.md)
