Skip to content

Conversation

@brookemosby
Copy link
Contributor

@brookemosby brookemosby commented Jan 22, 2026

Clean-up un-used error & also allow for both user configured & vercel set deployment ids.

@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Jan 22, 2026

Allow CI Workflow Run

  • approve CI run for commit: e48c70a

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Comment on lines +473 to +477
// Don't override NEXT_DEPLOYMENT_ID if it's already set by Vercel
// This prevents conflicts when Vercel manages deployment IDs internally
if (!process.env.NEXT_DEPLOYMENT_ID) {
process.env.NEXT_DEPLOYMENT_ID = id
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Don't override NEXT_DEPLOYMENT_ID if it's already set by Vercel
// This prevents conflicts when Vercel manages deployment IDs internally
if (!process.env.NEXT_DEPLOYMENT_ID) {
process.env.NEXT_DEPLOYMENT_ID = id
}
// When runtimeServerDeploymentId is disabled, the config value is authoritative
// and should override any pre-existing environment variable to ensure consistency
// between this.deploymentId and process.env.NEXT_DEPLOYMENT_ID
process.env.NEXT_DEPLOYMENT_ID = id

When runtimeServerDeploymentId is disabled and process.env.NEXT_DEPLOYMENT_ID is pre-set, divergence between this.deploymentId and process.env.NEXT_DEPLOYMENT_ID causes client/server deployment ID mismatch

Fix on Vercel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants