Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Running the optional angular build migration installs incompatible version of @angular/build

Offen
#30,696 4 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
38/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
angular, typescript
Bereich
build-system, cli

Rechercherichtung

Beginne mit der use-application-builder-Migration, die mit ng update @angular/cli --name=use-application-builder aufgerufen wird, und verwende die verknüpfte Reproduktion. Untersuche die Änderungen an package.json und angular.json sowie, wie die temporäre CLI @angular/build auflöst. Erledigt ist die Aufgabe, wenn die Migration eine mit dem zu aktualisierenden Projekt kompatible Version installiert und Tests diesen Fall der Versionsauswahl abdecken.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area: @angular/cli freq1: low severity3: broken type: bug/fix
Command

update

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

Running the optional migration after skipping the build migration during initial update incorrectly installs @angular/build v20 which is not compatible

Minimal Reproduction

https://github.com/simhnna/angular-build-migration-demo/tree/8971afceeaf60bbe9fff4c9a2777b7711dcb095f

Run ng update @angular/cli --name=use-application-builder

The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 20.1.0 to perform the update.
Using package manager: npm
Collecting installed dependencies...
Found 22 dependencies.
** Executing 'use-application-builder' of package '@angular/cli' **

❯ Migrate application projects to the new build system.
  Application projects that are using the '@angular-devkit/build-angular' package's 'browser' and/or 'browser-esbuild' builders will be migrated to use the new 'application' builder.
  You can read more about this, including known issues and limitations, here: https://angular.dev/tools/cli/build-system-migration
    The output location of the browser build has been updated from "dist/project" to "dist/project/browser". You might need to adjust your deployment pipeline or, as an alternative, set outputPath.browser to "" in order to maintain the previous functionality.
UPDATE package.json (1032 bytes)
UPDATE angular.json (2749 bytes)
✔ Packages installed successfully.
  Migration completed (2 files modified).

It installs @angular/build@20 because it uses @angular/cli@20 to run the update

Exception or Error

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

Angular CLI: 18.2.20
Node: 22.17.0
Package Manager: npm 10.9.2
OS: linux x64

Angular: 18.2.13
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1802.20
@angular-devkit/build-angular   18.2.20
@angular-devkit/core            18.2.20
@angular-devkit/schematics      18.2.20
@angular/cli                    18.2.20
@schematics/angular             18.2.20
rxjs                            7.8.2
typescript                      5.4.5
zone.js                         0.14.10
Anything else relevant?

No response

Vorherrschende Sprache
TypeScript
Sterne
27k
Forks
11.8k
Ø Merge
17 Std. 25 Min.
Gemergte PRs (30 T.)
183

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus angular/angular-cli

Alle Issues in angular/angular-cli

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.