To upgrade to the latest Next.js version, run the following command:
npm install next@latest
The command above fetches the latest version of Next.js and updates your project.
Identifying the Next.js version is your project is currently using:
- To access the current Next.js version your project is using, open your
package.json
file. - Under dependencies, look for
next
. The number to the right represents the Next.js version.
After running the command above to update the Next.js version, reopen/verify that the next version in the package.json
file has also been updated. That's it, you've updated your Next.js
application to the latest version. Note: You find the latest version of Next.js, along with latest features on the Next.js documentation website.