> ## Documentation Index
> Fetch the complete documentation index at: https://docs.frogbot.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrading Next.js

> Take Next.js patch releases yourself, inside the range FrogBot supports, and wait for a FrogBot release for minor and major versions.

A FrogBot app runs on Next.js, and `@frogbotai/next` declares which versions it works with as a peer dependency:

```json theme={"theme":"tokyo-night"}
"peerDependencies": {
  "next": ">=16.4.0 <17.0.0"
}
```

| Release | Example | Who upgrades |
| - | - | - |
| Patch | `16.4.2` → `16.4.6` | You, whenever you like. No FrogBot release is needed. |
| Minor or major | `16.4` → `16.5`, `16` → `17` | FrogBot. Wait for a FrogBot release that supports it, then upgrade both together. |

New apps scaffold `next` as `~16.4.6`, so a fresh install picks up the latest patch on its own.

## When Next.js reports a security advisory

Next.js checks its version against npm's security advisories on every `next build`. When a coding agent runs the build, a version with an advisory fails it:

```text theme={"theme":"tokyo-night"}
SecurityFatalError: Your version of Next.js is affected by a known security vulnerability
```

Install the patched version inside the supported range:

```bash theme={"theme":"tokyo-night"}
pnpm add next@16.4.6
```

`frogbot check` names this command too, and so do `frogbot status` and `.frogbot/service.log` for an app under `frogbot up`.

`frogbot up` builds as a background service, so Next.js doesn't stop its builds over an advisory, even when a coding agent started it. The app stays up on the vulnerable version until you install the fix, which rebuilds it.

Each advisory names its first patched version. If the only fix is a newer minor or major, it needs a FrogBot release first. FrogBot checks its own Next.js version against npm every day and bumps it when an advisory lands.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.