Skip to content

Application builder option server false does not work #29969

Closed

Description

@enten

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

Activity

  1. self-assigned this
    on Mar 31, 2025
  2. added theissue type on Mar 31, 2025
  3. added
    freq1: low
    on Mar 31, 2025
  4. added 3 commits that reference this issue on Mar 31, 2025
    79f1db1
    0fd8ead
    cc6c859
  5. added a commit that references this issue on Mar 31, 2025
    76cfd36
  6. added a commit that references this issue on Mar 31, 2025
    8a89438
  7. angular-automatic-lock-bot commented on May 1, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  8. locked and limited conversation to collaborators on May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions