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
- Run `next upgrade` (or `next upgrade --latest`) to move to the recommended/target version.
- For security nudges, upgrade to the patched version named in the advisory.
- 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
- Keep Next.js on a recent release so nudges don't trigger.
- Automate dependency updates (renovate/dependabot) to avoid version drift.
- For security nudges, upgrade promptly to the patched version.
- In scripts, handle the named error/exitCode 1 rather than assuming success.
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
- Could not prepare an upgrade retry. This command will…
- Could not prepare upgrade document
- No Next.js app found in this directory. Run the command…
- Unsupported AI upgrade type
- AI upgrades are not available for prerelease versions of…
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)