Receber por email
← Voltar para o catálogo

next-upgrade

Upgrade Next.js to the latest version following official migration guides and codemods

367estrelas
Atualizado há 4 meses

Ver no GitHub ↗

Como adicionar

/plugin marketplace add aiskillstore/marketplace

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/next-upgrade/svg)](https://www.skillteca.com.br/skills/next-upgrade)

Skills relacionadas

Ver todas de Segurança →

Alerta por categoria

Receba novas skills de Segurança toda segunda

1 email curto, só com as skills novas de Segurança. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Upgrade Next.js

Upgrade the current project to the latest Next.js version following official migration guides.

Instructions

  1. Detect current version: Read package.json to identify the current Next.js version and related dependencies (React, React DOM, etc.)
  1. Fetch the latest upgrade guide: Use WebFetch to get the official upgrade documentation:
  2. Codemods: https://nextjs.org/docs/app/building-your-application/upgrading/codemods
  3. Version-specific guides (adjust version as needed):
  4. https://nextjs.org/docs/app/building-your-application/upgrading/version-15
  5. https://nextjs.org/docs/app/building-your-application/upgrading/version-14
  1. Determine upgrade path: Based on current version, identify which migration steps apply. For major version jumps, upgrade incrementally (e.g., 13 → 14 → 15).
  1. Run codemods first: Next.js provides codemods to automate breaking changes:

``bash npx @next/codemod@latest <transform> <path> `` Common transforms:

  • next-async-request-api - Updates async Request APIs (v15)
  • next-request-geo-ip - Migrates geo/ip properties (v15)
  • next-dynamic-access-named-export - Transforms dynamic imports (v15)
  1. Update dependencies: Upgrade Next.js and peer dependencies together:

``bash npm install next@latest react@latest react-dom@latest ``

  1. Review breaking changes: Check the upgrade guide for manual changes needed:
  2. API changes (e.g., async params in v15)
  3. Configuration changes in next.config.js
  4. Deprecated features being removed
  1. Update TypeScript types (if applicable):

``bash npm install @types/react@latest @types/react-dom@latest ``

  1. Test the upgrade:
  2. Run npm run build to check for build errors
  3. Run npm run dev and test key functionality
Compartilhar X LinkedIn