upgrade_nextjs_16
Upgrade Next.js to version 16 by running the official codemod for automatic upgrades and fixes, then resolve remaining issues manually. Covers async API changes, config migration, and deprecated API removals.
Instructions
Guide through upgrading Next.js to version 16.
CRITICAL: Runs the official codemod FIRST (requires clean git state) for automatic upgrades and fixes, then handles remaining issues manually. The codemod upgrades Next.js, React, and React DOM automatically.
Covers:
Next.js version upgrade to 16
Async API changes (params, searchParams, cookies, headers)
Config migration (next.config changes)
Image defaults and optimization
Parallel routes and dynamic segments
Deprecated API removals
React 19 compatibility
The codemod requires:
Clean git working directory (commit or stash changes first)
Node.js 18+
npm/pnpm/yarn/bun installed
After codemod runs, provides manual guidance for any remaining issues not covered by the codemod.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | No |