Skip to content

Build breaks when updating @angular/build >= 21.2.13 #33441

Description

@roennibus

Command

build

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

21.2.12

Description

Updating from 21.2.7 to latest v21 breaks build.
This behaviour was introduced in #33222
I would not expect a breaking change in a patch version.

Minimal Reproduction

The repo contains a shared asset folder that is used by multiple projects.

  1. Updated from 21.2.7 to latest v21
  2. Build breaks with error message An unhandled exception occurred: The ../../../../shared/images/ asset path must be within the workspace root.

Exception or Error

An unhandled exception occurred: The ../../../../shared/images/ asset path must be within the workspace root.

Your Environment

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI       : 21.2.16
Angular           : 21.2.17
Node.js           : 24.17.0
Package Manager   : yarn 4.14.1
Operating System  : win32 x64

┌───────────────────────────────────┬───────────────────┬───────────────────┐
│ Package                           │ Installed Version │ Requested Version │
├───────────────────────────────────┼───────────────────┼───────────────────┤
│ @angular-devkit/build-angular     │ 21.2.13           │ 21.2.13           │
│ @angular/animations               │ 21.2.17           │ 21.2.17           │
│ @angular/cdk                      │ 21.2.14           │ 21.2.14           │
│ @angular/cli                      │ 21.2.16           │ 21.2.16           │
│ @angular/common                   │ 21.2.17           │ 21.2.17           │
│ @angular/compiler                 │ 21.2.17           │ 21.2.17           │
│ @angular/compiler-cli             │ 21.2.17           │ 21.2.17           │
│ @angular/core                     │ 21.2.17           │ 21.2.17           │
│ @angular/forms                    │ 21.2.17           │ 21.2.17           │
│ @angular/language-service         │ 21.2.17           │ 21.2.17           │
│ @angular/material                 │ 21.2.14           │ 21.2.14           │
│ @angular/platform-browser         │ 21.2.17           │ 21.2.17           │
│ @angular/platform-browser-dynamic │ 21.2.17           │ 21.2.17           │
│ @angular/router                   │ 21.2.17           │ 21.2.17           │
│ rxjs                              │ 7.8.1             │ 7.8.1             │
│ typescript                        │ 5.9.2             │ 5.9.2             │
│ zone.js                           │ 0.15.1            │ ~0.15.1           │
└───────────────────────────────────┴───────────────────┴───────────────────┘

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions