Description
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
When the tsconfig.*
files are not in the default location, the migration scripts fail to locate them and abort with an error.
Minimal Reproduction
ng new ang17 # create new project, accept the default options
cd ang17
mv tsconfig* src # move tsconfig to a different location
sed -i 's/tsconfig/src\/tsconfig/g' angular.json # update references to tsconfig
ng update @angular/core@18 @angular/cli@18 # update, enable the use-application-builder migration
# This then outputs Error 1
ng update @angular/core@19 @angular/cli@19 # update, enable the use-application-builder migration
# This outputs Error 2
Exception or Error
# Error 1
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 18.2.14 to perform the update.
✔ Packages successfully installed.
Using package manager: npm
Collecting installed dependencies...
Found 22 dependencies.
Fetching dependency metadata from registry...
Updating package.json with dependency @angular-devkit/build-angular @ "18.2.14" (was "17.3.12")...
Updating package.json with dependency @angular/cli @ "18.2.14" (was "17.3.12")...
Updating package.json with dependency @angular/compiler-cli @ "18.2.13" (was "17.3.12")...
Updating package.json with dependency @angular/animations @ "18.2.13" (was "17.3.12")...
Updating package.json with dependency @angular/common @ "18.2.13" (was "17.3.12")...
Updating package.json with dependency @angular/compiler @ "18.2.13" (was "17.3.12")...
Updating package.json with dependency @angular/core @ "18.2.13" (was "17.3.12")...
Updating package.json with dependency @angular/forms @ "18.2.13" (was "17.3.12")...
Updating package.json with dependency @angular/platform-browser @ "18.2.13" (was "17.3.12")...
Updating package.json with dependency @angular/platform-browser-dynamic @ "18.2.13" (was "17.3.12")...
Updating package.json with dependency @angular/router @ "18.2.13" (was "17.3.12")...
UPDATE package.json (1047 bytes)
✔ Cleaning node modules directory
✔ Installing packages
** Optional migrations of package '@angular/cli' **
This package has 1 optional migration that can be executed.
Optional migrations may be skipped and executed after the update process, if preferred.
Select the migrations that you'd like to run [use-application-builder] Migrate application projects to
the new build system. (https://angular.dev/tools/cli/build-system-migration)
❯ 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
✖ Migration failed: Path "tsconfig.json" does not exist.
See "/tmp/ng-4Cuhlf/angular-errors.log" for further details.
# Error 2
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 19.2.0 to perform the update.
Using package manager: npm
Collecting installed dependencies...
Found 22 dependencies.
Fetching dependency metadata from registry...
Updating package.json with dependency @angular-devkit/build-angular @ "19.2.0" (was "18.2.14")...
Updating package.json with dependency @angular/cli @ "19.2.0" (was "18.2.14")...
Updating package.json with dependency @angular/compiler-cli @ "19.2.0" (was "18.2.13")...
Updating package.json with dependency typescript @ "5.8.2" (was "5.4.5")...
Updating package.json with dependency @angular/animations @ "19.2.0" (was "18.2.13")...
Updating package.json with dependency @angular/common @ "19.2.0" (was "18.2.13")...
Updating package.json with dependency @angular/compiler @ "19.2.0" (was "18.2.13")...
Updating package.json with dependency @angular/core @ "19.2.0" (was "18.2.13")...
Updating package.json with dependency @angular/forms @ "19.2.0" (was "18.2.13")...
Updating package.json with dependency @angular/platform-browser @ "19.2.0" (was "18.2.13")...
Updating package.json with dependency @angular/platform-browser-dynamic @ "19.2.0" (was "18.2.13")...
Updating package.json with dependency @angular/router @ "19.2.0" (was "18.2.13")...
Updating package.json with dependency zone.js @ "0.15.0" (was "0.14.10")...
UPDATE package.json (1036 bytes)
✔ Cleaning node modules directory
✔ Installing packages
** Executing migrations of package '@angular/cli' **
❯ Update '@angular/ssr' import paths to use the new '/node' entry point when 'CommonEngine' is detected.
Migration completed (No changes made).
❯ Update the workspace configuration by replacing deprecated options in 'angular.json' for compatibility with the latest Angular CLI changes.
Migration completed (No changes made).
** Optional migrations of package '@angular/cli' **
This package has 1 optional migration that can be executed.
Optional migrations may be skipped and executed after the update process, if preferred.
Select the migrations that you'd like to run [use-application-builder] Migrate application projects to the new build system.
(https://angular.dev/tools/cli/build-system-migration)
❯ 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
✖ Migration failed: Path "tsconfig.json" does not exist.
See "/tmp/ng-VNiicY/angular-errors.log" for further details
Your Environment
# Upgrading from 17 to 18
$ ng version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 17.3.10
Node: 18.20.4
Package Manager: npm 10.9.1
OS: linux x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1703.10 (cli-only)
@angular-devkit/core 17.3.10 (cli-only)
@angular-devkit/schematics 17.3.10 (cli-only)
@schematics/angular 17.3.10 (cli-only)
# Upgrading from 18 to 19
$ ng version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 18.2.14
Node: 18.20.4
Package Manager: npm 10.9.1
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.14
@angular-devkit/build-angular 18.2.14
@angular-devkit/core 18.2.14
@angular-devkit/schematics 18.2.14
@angular/cli 18.2.14
@schematics/angular 18.2.14
rxjs 7.8.2
typescript 5.4.5
zone.js 0.14.10
Anything else relevant?
No response