mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
docs: rework version staleness (#90192)
Closes: https://linear.app/vercel/issue/DOC-6144/error-page-version-staleness
This commit is contained in:
@@ -1,63 +1,73 @@
|
||||
---
|
||||
title: Version Staleness
|
||||
title: A newer version is available
|
||||
---
|
||||
|
||||
## Why This Error Occurred
|
||||
## What this notice means
|
||||
|
||||
In the error overlay, a message was shown that the detected Next.js version was out-of-date.
|
||||
The development overlay shows that your installed version of Next.js is not the latest available. During development, Next.js checks the [npm registry](https://www.npmjs.com/package/next) and compares your installed version against the latest release. If a newer version is available, Next.js displays a notice in the overlay.
|
||||
|
||||
To get the newest features and bug fixes, it is recommended to stay up to date.
|
||||
Newer versions contain bug fixes and improved error tracing capabilities. Upgrade before investigating further.
|
||||
|
||||
## Possible Ways to Fix It
|
||||
Upgrading Next.js won't fix errors that originate in your own code or third-party libraries. However, newer versions often provide better error messages and stack traces that can help you identify the root cause.
|
||||
|
||||
If you are testing out a canary release, upgrade Next.js with one of the following:
|
||||
If upgrading does not resolve your issue, search [GitHub Discussions](https://github.com/vercel/next.js/discussions) to see if others have encountered the same problem. If you cannot find a match, consider creating a new discussion with details about your error.
|
||||
|
||||
```bash filename="Terminal"
|
||||
npm i next@canary
|
||||
```
|
||||
If you believe the issue is a bug in Next.js and you have a minimal, shareable reproduction repository, [open an issue on GitHub](https://github.com/vercel/next.js/issues/new/choose).
|
||||
|
||||
```bash filename="Terminal"
|
||||
yarn add next@canary
|
||||
```
|
||||
> **Good to know:** A reproduction repository is required when opening an issue. Issues without one are automatically closed.
|
||||
|
||||
```bash filename="Terminal"
|
||||
pnpm add next@canary
|
||||
```
|
||||
## Staleness levels
|
||||
|
||||
```bash filename="Terminal"
|
||||
bun add next@canary
|
||||
```
|
||||
- **Stale (patch or minor):** A newer stable release is available with bug fixes or new features.
|
||||
- **Stale (prerelease):** You are on a canary release and a newer canary is available. Canary versions are published frequently, so this is expected.
|
||||
- **Outdated (major):** Your installed version is behind by a major version. Upgrading is recommended to get security fixes and new features.
|
||||
|
||||
If you are using a stable release, upgrade Next.js with one of the following:
|
||||
## Upgrading
|
||||
|
||||
```bash filename="Terminal"
|
||||
Latest stable version:
|
||||
|
||||

|
||||
|
||||
To upgrade to the latest stable release:
|
||||
|
||||
```bash package="npm"
|
||||
npm i next@latest
|
||||
```
|
||||
|
||||
```bash filename="Terminal"
|
||||
```bash package="yarn"
|
||||
yarn add next@latest
|
||||
```
|
||||
|
||||
```bash filename="Terminal"
|
||||
```bash package="pnpm"
|
||||
pnpm add next@latest
|
||||
```
|
||||
|
||||
```bash filename="Terminal"
|
||||
```bash package="bun"
|
||||
bun add next@latest
|
||||
```
|
||||
|
||||
If you are coming from an older major version, check out our [upgrade guides](/docs/pages/guides/upgrading).
|
||||
To upgrade to the latest canary release:
|
||||
|
||||
### Note
|
||||
```bash package="npm"
|
||||
npm i next@canary
|
||||
```
|
||||
|
||||
If you want to report a bug on GitHub, you should upgrade to the newest canary release of Next.js first, to see if the bug has already been fixed in canary.
|
||||
```bash package="yarn"
|
||||
yarn add next@canary
|
||||
```
|
||||
|
||||
## Useful Links
|
||||
```bash package="pnpm"
|
||||
pnpm add next@canary
|
||||
```
|
||||
|
||||
- [Upgrade guide](/docs/pages/guides/upgrading)
|
||||
- [Video: How to Contribute to Open Source (Next.js)](https://www.youtube.com/watch?v=cuoNzXFLitc)
|
||||
- [Contributing to Next.js](https://github.com/vercel/next.js/blob/canary/contributing.md)
|
||||
- [Triaging issues](https://github.com/vercel/next.js/blob/canary/contributing/repository/triaging.md)
|
||||
- [Verifying canary](https://github.com/vercel/next.js/blob/canary/.github/comments/verify-canary.md)
|
||||
- [Adding a reproduction](https://github.com/vercel/next.js/blob/canary/.github/comments/invalid-reproduction.md)
|
||||
- [Simplifying a reproduction](https://github.com/vercel/next.js/blob/canary/.github/comments/simplify-reproduction.md)
|
||||
```bash package="bun"
|
||||
bun add next@canary
|
||||
```
|
||||
|
||||
If you are coming from an older major version, check out the [upgrade guides](/docs/app/guides/upgrading).
|
||||
|
||||
## Contributing
|
||||
|
||||
Next.js is open source and welcomes contributions. If you have identified a bug and want to fix it yourself, see the [contributing guide](https://github.com/vercel/next.js/blob/canary/contributing.md) or watch [How to Contribute to Open Source (Next.js)](https://www.youtube.com/watch?v=cuoNzXFLitc) to get started.
|
||||
|
||||
You can also help by [triaging issues](https://github.com/vercel/next.js/blob/canary/contributing/repository/triaging.md), [verifying canary releases](https://github.com/vercel/next.js/blob/canary/.github/comments/verify-canary.md), or providing a [minimal reproduction](https://github.com/vercel/next.js/blob/canary/.github/comments/invalid-reproduction.md) for existing issues.
|
||||
|
||||
Reference in New Issue
Block a user