How to Migrate Next.js from Version 15 to 16

profile

Biswajit Nayak

1 Min Reading,

Share

Using the codemod

To update to Next.js version 16, you can use the upgrade codemode:

npx @next/codemod@canary upgrade latest

The codemod is able to:

  • Update next.config.js to use the new turbopack configuration
  • Migrate from next lint to the ESLint CLI
  • Migrate from deprecated middleware convention to proxy
  • Remove unstable_ prefix from stabilized APIs
  • Remove experimental_ppr Route Segment Config from pages and layouts
npm install next@latest react@latest react-dom@latest

If you are using TypeScript, ensure you also upgrade @type/react and @types/react-dom to their latest versions.

Turbopack by default

Previously you had to enable Turbopack using --turbopack , or --turbo

{  
"scripts": {
"dev": "next dev --turbopack",
"build": "next build --turbopack",
"start": "next start"
}
}

This is no longer necessary. You can update your package.json scripts:

{  
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
}
}