← 返回
开发者工具 中文

Next Upgrade

Upgrade Next.js to the latest version following official migration guides and codemods
按照官方迁移指南与 codemods 升级 Next.js 至最新版本
tuanvidev tuanvidev 来源
开发者工具 clawhub v0.1.0 1 版本 99892.6 Key: 无需
★ 1
Stars
📥 910
下载
💾 11
安装
1
版本
#latest

概述

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:
    • Codemods: https://nextjs.org/docs/app/guides/upgrading/codemods
    • Version-specific guides (adjust version as needed):
    • https://nextjs.org/docs/app/guides/upgrading/version-16
    • https://nextjs.org/docs/app/guides/upgrading/version-15
    • https://nextjs.org/docs/app/guides/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

```

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:
    • API changes (e.g., async params in v15)
    • Configuration changes in next.config.js
    • Deprecated features being removed
  1. Update TypeScript types (if applicable):

```bash

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

```

  1. Test the upgrade:
    • Run npm run build to check for build errors
    • Run npm run dev and test key functionality

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-29 09:19 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 181,457
dev-programming

Docker Essentials

arnarsson
核心 Docker 命令和工作流程,包括容器管理、镜像操作和调试。
★ 38 📥 32,239
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 677 📥 325,884