Skip to content

Application builder option server false does not work #29969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
enten opened this issue Mar 28, 2025 · 0 comments · Fixed by #29975
Closed
1 task

Application builder option server false does not work #29969

enten opened this issue Mar 28, 2025 · 0 comments · Fixed by #29975
Assignees

Comments

@enten
Copy link

enten commented Mar 28, 2025

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

@alan-agius4 alan-agius4 self-assigned this Mar 31, 2025
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Mar 31, 2025
The schema included a top-level `type`, preventing this option from functioning correctly.

Closes: angular#29969
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Mar 31, 2025
The schema included a top-level `type`, preventing this option from functioning correctly.

Closes: angular#29969
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Mar 31, 2025
The schema included a top-level `type`, preventing this option from functioning correctly.

Closes: angular#29969
alan-agius4 added a commit that referenced this issue Mar 31, 2025
The schema included a top-level `type`, preventing this option from functioning correctly.

Closes: #29969
(cherry picked from commit 8a89438)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants