How to upgrade to version 14
Upgrading from 13 to 14
To update to Next.js version 14, run the following command using your preferred package manager:
Terminal
npm i next@next-14 react@18 react-dom@18 && npm i eslint-config-next@next-14 -DTerminal
yarn add next@next-14 react@18 react-dom@18 && yarn add eslint-config-next@next-14 -DTerminal
pnpm i next@next-14 react@18 react-dom@18 && pnpm i eslint-config-next@next-14 -DTerminal
bun add next@next-14 react@18 react-dom@18 && bun add eslint-config-next@next-14 -DGood to know: If you are using TypeScript, ensure you also upgrade
@types/reactand@types/react-domto their latest versions.
v14 Summary
- The minimum Node.js version has been bumped from 16.14 to 18.17, since 16.x has reached end-of-life.
- The
next exportcommand has been removed in favor ofoutput: 'export'config. Please see the docs for more information. - The
next/serverimport forImageResponsewas renamed tonext/og. A codemod is available to safely and automatically rename your imports. - The
@next/fontpackage has been fully removed in favor of the built-innext/font. A codemod is available to safely and automatically rename your imports. - The WASM target for
next-swchas been removed.
Was this helpful?