Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
4a994f62
Commit
4a994f62
authored
Jan 27, 2026
by
Brooke Mosby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding in validation
parent
7e00287d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
index.ts
packages/next/src/build/index.ts
+8
-2
No files found.
packages/next/src/build/index.ts
View file @
4a994f62
...
...
@@ -971,8 +971,14 @@ export default async function build(
)
loadedConfig
=
config
// Validate deploymentId if provided
if
(
config
.
deploymentId
!==
undefined
)
{
// Validate deploymentId if explicitly configured by user (not from NEXT_DEPLOYMENT_ID env var)
// config.deploymentId may come from either user config or NEXT_DEPLOYMENT_ID env var
// We only validate user-configured IDs since Vercel sets NEXT_DEPLOYMENT_ID with dpl_* format
const
isUserConfiguredDeploymentId
=
config
.
deploymentId
!==
undefined
&&
config
.
deploymentId
!==
process
.
env
.
NEXT_DEPLOYMENT_ID
if
(
isUserConfiguredDeploymentId
)
{
if
(
typeof
config
.
deploymentId
!==
'string'
)
{
throw
new
Error
(
`Invalid \`deploymentId\` configuration: must be a string. See https://nextjs.org/docs/messages/deploymentid-not-a-string`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment