1 Min Reading,
Using the codemod
To update to Next.js version 16, you can use the upgrade codemode:
npx @next/codemod@canary upgrade latestThe 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@latestIf 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"
}
}
