Skip to content

Next.js Upgrade

Next.js

Guides upgrading Next.js to the latest version using official migration docs and codemods.

Overview

Next.js Upgrade automates the process of upgrading a Next.js project to a newer version. It follows the official migration documentation and applies codemods where available, handling breaking changes methodically. The skill supports incremental upgrades (e.g., 13 to 14 to 15 to 16) so you don't have to jump multiple major versions at once.

When to Use

  • Upgrading Next.js from one major version to the next
  • Need to apply codemods for breaking API changes
  • Want a step-by-step migration that follows official docs
  • Upgrading incrementally across multiple major versions (13 to 14 to 15 to 16)
  • Checking compatibility of your codebase with a target Next.js version

Key Features

  • Official migration docs — follows Vercel's documented upgrade path for each version
  • Codemod support — automatically applies available codemods to transform deprecated APIs
  • Incremental upgrades — steps through each major version sequentially (13 -> 14 -> 15 -> 16) rather than jumping
  • Optional target version — accepts a --target-version argument to specify the desired version
  • Breaking change detection — identifies and addresses breaking changes at each version boundary
  • Dependency updates — handles related dependency upgrades (React, TypeScript, ESLint, etc.)

Example Prompts

text
"Upgrade my Next.js project to the latest version"
"Migrate my app from Next.js 14 to 16"
"/next-upgrade --target-version 16"

Source

Managed with Obsidian · Rendered by VitePress