Skip to content

Commit 9e0f593

Browse files
authored
chore: do not suggest vulnerable Next.js release in turbopack build error message (#14873)
This updates the error message shown when using Turbopack build with an unsupported Next.js version to make it more generic and future-proof, removing references to an outdated canary release that includes a security vulnerability.
1 parent beb87a0 commit 9e0f593

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/next/src/withPayload/withPayloadLegacy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import type { NextConfig } from 'next'
33

44
/**
5-
* Applies config options required to support Next.js versions before 16.1.0 and 16.1.0-canary.15.
5+
* Applies config options required to support Next.js versions before 16.1.0 and 16.1.0-canary.3.
66
*/
77
export const withPayloadLegacy = (nextConfig: NextConfig = {}): NextConfig => {
88
if (process.env.PAYLOAD_PATCH_TURBOPACK_WARNINGS !== 'false') {
@@ -48,7 +48,7 @@ export const withPayloadLegacy = (nextConfig: NextConfig = {}): NextConfig => {
4848

4949
if (isBuild && (isTurbopackNextjs15 || isTurbopackNextjs16)) {
5050
throw new Error(
51-
'Your Next.js and Payload versions do not support using Turbopack for production builds. Please upgrade to Next.js 16.1.0-canary.3 or higher if you want to use Turbopack for builds.',
51+
'Your Next.js and Payload versions do not support using Turbopack for production builds. Please upgrade to Next.js 16.1.0 or, if not yet released, the latest canary release.',
5252
)
5353
}
5454

0 commit comments

Comments
 (0)