#How can I upgrade my nextjs version in an existing project
1 messages · Page 1 of 1 (latest)
Hi @hallow swift. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
To upgrade your Next.js version in an existing project, you can follow these steps:
-
First, ensure you're using a compatible Node.js version. As of Next.js 14, the minimum required Node.js version is 18.17. You can check this in the App Router Migration Guide.
-
To update to the latest stable version of Next.js, run one of the following commands depending on your package manager:
npm i next@latest react@latest react-dom@latestor
yarn add next@latest react@latest react-dom@latestor
pnpm i next@latest react@latest react-dom@latestor
bun add next@latest react@latest react-dom@latest -
If you're using ESLint, you should also update your ESLint configuration:
npm install -D eslint-config-next@latest -
If you're using TypeScript, make sure to also upgrade
@types/reactand@types/react-domto their latest versions.
After upgrading, it's important to review the changelog and upgrade guide for the specific version you're upgrading to, as there might be breaking changes or new features that require additional steps.
For more detailed information on upgrading, you can refer to the following resources: