Skip to content

breaking change between v21.2.12 to v21.2.13 with asset path must be within the workspace root #33481

Description

@Shinigami92

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

v21.2.12

Description

The change introduced in 2b3e955#diff-5bcaeedc111bad2d95741182748c5c102a0d89edf0129eb2e8e84fa773de74d4R74-R75 broke a dependency resolution in our setup

Minimal Reproduction

we have a monorepo with monaco-editor + ngx-monaco-editor-v2, ngx-monaco-editor-v2 is installed in two projects and monaco-editor is installed in root
In angular.json in one of the projects we have "assets": [..., {"glob": "**/*", "input": "../../node_modules/monaco-editor", "output": "/assets/monaco/"}]

Exception or Error

[error] Error: The ../../node_modules/monaco-editor asset path must be within the workspace root.
    at /Users/.../.../client/node_modules/.pnpm/@angular+build@21.2.13_@angular+compiler-cli@21.2.17_@angular+compiler@21.2.17_typescri_a838a635336bc9ea69d2e1bb26b322ef/node_modules/@angular/build/src/utils/normalize-asset-patterns.js:104:23
    at Array.map (<anonymous>)
    at normalizeAssetPatterns (/Users/.../.../client/node_modules/.pnpm/@angular+build@21.2.13_@angular+compiler-cli@21.2.17_@angular+compiler@21.2.17_typescri_a838a635336bc9ea69d2e1bb26b322ef/node_modules/@angular/build/src/utils/normalize-asset-patterns.js:59:26)
    at normalizeOptions (/Users/.../.../client/node_modules/.pnpm/@angular+build@21.2.13_@angular+compiler-cli@21.2.17_@angular+compiler@21.2.17_typescri_a838a635336bc9ea69d2e1bb26b322ef/node_modules/@angular/build/src/builders/application/options.js:77:46)
    at async buildApplicationInternal (/Users/.../.../client/node_modules/.pnpm/@angular+build@21.2.13_@angular+compiler-cli@21.2.17_@angular+compiler@21.2.17_typescri_a838a635336bc9ea69d2e1bb26b322ef/node_modules/@angular/build/src/builders/application/index.js:86:31)
    at async buildApplication (/Users/.../.../client/node_modules/.pnpm/@angular+build@21.2.13_@angular+compiler-cli@21.2.17_@angular+compiler@21.2.17_typescri_a838a635336bc9ea69d2e1bb26b322ef/node_modules/@angular/build/src/builders/application/index.js:162:22)
    at async runBuilder (/Users/.../.../client/node_modules/.pnpm/@angular-architects+native-federation@21.2.3_@angular+compiler-cli@21.2.17_@angular+com_55946e23f132ccc6b93bacf695be2219/node_modules/@angular-architects/native-federation/src/builders/build/builder.js:243:26)
    at async handleAsyncIterator (/Users/.../.../client/node_modules/.pnpm/@angular-devkit+architect@0.2102.13_chokidar@5.0.0/node_modules/@angular-devkit/architect/src/api.js:38:28)

Your Environment

Angular CLI       : 21.2.13
Angular           : 21.2.17
Node.js           : 26.4.0 (Unsupported)
Package Manager   : pnpm 11.9.0
Operating System  : darwin arm64

┌───────────────────────────────┬───────────────────┬───────────────────┐
│ Package                       │ Installed Version │ Requested Version │
├───────────────────────────────┼───────────────────┼───────────────────┤
│ @angular-devkit/build-angular │ 21.2.13           │ 21.2.13           │
│ @angular-devkit/core          │ 21.2.13           │ 21.2.13           │
│ @angular/build                │ 21.2.13           │ 21.2.13           │
│ @angular/cli                  │ 21.2.13           │ 21.2.13           │
│ @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/platform-browser     │ 21.2.17           │ 21.2.17           │
│ ng-packagr                    │ 21.2.5            │ 21.2.5            │
│ typescript                    │ 5.9.3             │ 5.9.3             │
│ vitest                        │ 4.1.9             │ 4.1.9             │
│ zone.js                       │ 0.15.1            │ 0.15.1            │
└───────────────────────────────┴───────────────────┴───────────────────┘
Warning: The current version of Node (26.4.0) is not supported by Angular.

Anything else relevant?

We can life with a simple optional flag we could toggle

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions