Description
Command
run
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
In Application builder target options (@angular-devkit/build-angular:application
), the option server
is declared as below since 19.1.0-next.0:
"server": {
"type": "string",
"description": "The full path for the server entry point to the application, relative to the current workspace.",
"oneOf": [
{
"type": "string",
"description": "The full path for the server entry point to the application, relative to the current workspace."
},
{
"const": false,
"type": "boolean",
"description": "Indicates that a server entry point is not provided."
}
]
}
But when we specify value false
, it throws an error:
Error: Schema validation failed with the following errors:
Data path "/server" must be string.
Minimal Reproduction
Run command ng run my-app:build
with angular.json below that specify option "server": false
:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"my-app": {
"projectType": "application",
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/my-app",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"src/styles.scss"
],
"scripts": [],
"server": false
}
}
}
}
}
Exception or Error
Error: Schema validation failed with the following errors:
Data path "/server" must be string.
Your Environment
Angular CLI: 20.0.0-next.3
Node: 20.11.1
Package Manager: npm 10.2.4
OS: win32 x64
Angular: 20.0.0-next.4
... common, compiler, compiler-cli, core, forms
... platform-browser, platform-server, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.2000.0-next.3
@angular-devkit/core 20.0.0-next.3
@angular-devkit/schematics 20.0.0-next.3
@angular/build 20.0.0-next.3
@angular/cli 20.0.0-next.3
@angular/ssr 20.0.0-next.3
@schematics/angular 20.0.0-next.3
rxjs 7.8.2
typescript 5.8.2
zone.js 0.15.0
Anything else relevant?
No response