vercel/next.js · warning

${warning}

Error message

${warning}

What it means

This message is the placeholder of the upgrade nudge warning: showNudge logs the caller-supplied `warning` text (a version/security advisory or future-flag notice) when a nudge retry is allowed. It is informational output, not a thrown error; if the user declines the prompt that follows, an Error built from `prompt` with the given errorName and exitCode 1 is raised to exit the command.

Solutions

  1. Run `next upgrade` (or `next upgrade --latest`) to move to the recommended/target version.
  2. For security nudges, upgrade to the patched version named in the advisory.
  3. Suppress the prompt by upgrading, or handle the named error/exit code 1 in automated scripts if the nudge is declined.
Defensive patterns

Strategy: validation

Validate before calling

// Check your installed version against latest before running commands
const local = require('next/package.json').version
const res = await fetch('https://registry.npmjs.org/next/latest')
const latest = (await res.json()).version
console.log('behind latest:', local !== latest)

Try / catch

try {
  await build()
} catch (e) {
  if (e.exitCode === 1 && /upgrade/i.test(e.message || '')) {
    // user declined / nudge blocked the command; upgrade then retry
  } else throw e
}

Prevention

When it happens

Trigger: Running any CLI command that calls nudgeForSecurity/nudgeForLatest/nudgeForFuture when the installed Next.js version is behind (latest nudge), affected by advisories (security nudge), or eligible for a future flag (future nudge), and a retry is permitted.

Common situations: Working on an outdated Next.js minor/major behind the latest release; a security advisory matching the installed version; CI environments where the nudge prompt would block.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


AI-assisted analysis of vercel/next.js@34433fd12e (2026-09-20). Data as JSON: /api/errors/253d544c80a8ece1. Report an issue: GitHub.

Appendix: source

Thrown at packages/next/src/lib/upgrade/nudge.ts:121

async function showNudge(
  options: SecurityNudgeOptions,
  version: string,
  kind: NudgeKind,
  prompt: string,
  warning: string,
  errorName: string
): Promise<void> {
  let retryAllowed = false
  try {
    retryAllowed = await allowNudgeRetry(options, version, kind)
  } catch {
    Log.warn(
      'Could not prepare an upgrade retry. This command will remain blocked.'
    )
  }

  if (retryAllowed) {
    Log.warn(warning)
    return
  }

  const error = new Error(prompt)
  error.name = errorName
  Object.assign(error, { exitCode: 1 })
  throw error
}

async function getLatestUpgrade(
  installedVersion: string = process.env.__NEXT_VERSION || 'unknown'
): Promise<{ installedVersion: string; latestVersion: string } | null> {
  try {
    if (!(await getAgentName())) {
      return null
    }

    const { getLatestUpgradeVersion } =

View on GitHub (pinned to 34433fd12e)