-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Copy link
Labels
area: @schematics/angularfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
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
20.1.5
Description
This is likely a Windows / path issue with the migration. Upgrading to 20.2.0 from ~20.1.5 I got:
> yarn dlx -p @angular/cli ng update @angular/core @angular/cli @angular/common @angular/cdk @angular-eslint/schematics @angular/forms --force
➤ YN0000: · Yarn 4.9.1
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @angular/cli@npm:20.2.0, @algolia/abtesting@npm:1.1.0, @algolia/client-abtesting@npm:5.35.0, @algolia/client-analytics@npm:5.35.0, @algolia/client-common@npm:5.35.0, @algolia/client-insights@npm:5.35.0, and 301 more.
...
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 20.2.0 to perform the update.
(node:33724) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Using package manager: yarn
Collecting installed dependencies...
Found 137 dependencies.
Fetching dependency metadata from registry...
Package '@angular-eslint/schematics' is already up to date.
Package "@angular-devkit/build-angular" has an incompatible peer dependency to "jest" (requires "^29.5.0", would install "30.0.5")
Package "@angular-devkit/build-angular" has an incompatible peer dependency to "jest-environment-jsdom" (requires "^29.5.0", would install "30.0.5")
Updating package.json with dependency @angular-devkit/build-angular @ "20.2.0" (was "20.1.5")...
Updating package.json with dependency @angular/animations @ "20.2.0" (was "20.1.6")...
Updating package.json with dependency @angular/cli @ "20.2.0" (was "20.1.5")...
Updating package.json with dependency @angular/compiler @ "20.2.0" (was "20.1.6")...
Updating package.json with dependency @angular/compiler-cli @ "20.2.0" (was "20.1.6")...
Updating package.json with dependency @angular/language-service @ "20.2.0" (was "20.1.6")...
Updating package.json with dependency @angular/cdk @ "20.2.0" (was "20.1.6")...
Updating package.json with dependency @angular/common @ "20.2.0" (was "20.1.7")...
Updating package.json with dependency @angular/core @ "20.2.0" (was "20.1.7")...
Updating package.json with dependency @angular/forms @ "20.2.0" (was "20.1.7")...
Updating package.json with dependency @angular/platform-browser @ "20.2.0" (was "20.1.7")...
Updating package.json with dependency @angular/router @ "20.2.0" (was "20.1.7")...
UPDATE package.json (20075 bytes)
✔ Cleaning node modules directory
✔ Installing packages
** Executing migrations of package '@angular/cli' **
❯ Remove any karma configuration files that only contain the default content.
The default configuration is automatically available without a specific project file.
✖ Migration failed: ENOENT: no such file or directory, open 'C:\src\my-company\config\files\karma.conf.js.template'
See "C:\Users\Me\AppData\Local\Temp\ng-MbLUTk\angular-errors.log" for further details.
The angular-errors.log is:
[error] Error: ENOENT: no such file or directory, open 'C:\src\my-company\config\files\karma.conf.js.template'
at async open (node:internal/fs/promises:640:25)
at async readFile (node:internal/fs/promises:1244:14)
at async generateDefaultKarmaConfig (C:\src\my-company\webui\node_modules\@schematics\angular\migrations\karma\karma-config-comparer.js:32:20)
at async compareKarmaConfigToDefault (C:\src\my-company\webui\node_modules\@schematics\angular\migrations\karma\karma-config-comparer.js:87:28)
at async C:\src\my-company\webui\node_modules\@schematics\angular\migrations\karma\migration.js:45:42
at async C:\src\my-company\webui\node_modules\@schematics\angular\utility\workspace.js:64:24
at async callRuleAsync (C:\Users\Me\AppData\Local\Temp\angular-cli-packages-CrIzOu\node_modules\@angular-devkit\schematics\src\rules\call.js:80:18)
Note that the directory C:\src\my-company\config\
is outside of the project (and outside of node_modules), so it's looking in the wrong place. There is a matching file under node_modules:
> ls -R karma.conf.js.template
Directory: C:\src\my-company\webui\node_modules\@schematics\angular\config\files
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 8/20/2025 11:33 AM 1350 karma.conf.js.template
Minimal Reproduction
I can provide a repro if absolutely necessary - let me know, it will take a while to create. But I expect that the info I've provided here is enough to find the cause of the failure.
Exception or Error
[error] Error: ENOENT: no such file or directory, open 'C:\src\my-company\config\files\karma.conf.js.template'
at async open (node:internal/fs/promises:640:25)
at async readFile (node:internal/fs/promises:1244:14)
at async generateDefaultKarmaConfig (C:\src\my-company\webui\node_modules\@schematics\angular\migrations\karma\karma-config-comparer.js:32:20)
at async compareKarmaConfigToDefault (C:\src\my-company\webui\node_modules\@schematics\angular\migrations\karma\karma-config-comparer.js:87:28)
at async C:\src\my-company\webui\node_modules\@schematics\angular\migrations\karma\migration.js:45:42
at async C:\src\my-company\webui\node_modules\@schematics\angular\utility\workspace.js:64:24
at async callRuleAsync (C:\Users\Me\AppData\Local\Temp\angular-cli-packages-CrIzOu\node_modules\@angular-devkit\schematics\src\rules\call.js:80:18)
Your Environment
Angular CLI: 20.2.0
Node: 24.2.0
Package Manager: yarn 4.9.1
OS: win32 x64
Angular: 20.2.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, platform-browser, router
Package Version
---------------------------------------
@angular-devkit/architect 0.2002.0
@angular-devkit/build-angular 20.2.0
@angular-devkit/core 20.2.0
@angular-devkit/schematics 20.1.4
@schematics/angular 20.2.0
ng-packagr 20.1.0
rxjs 7.8.2
typescript 5.8.3
webpack 5.101.0
zone.js 0.15.1
jchai10, dpeese, tom2all-link and reifi
Metadata
Metadata
Assignees
Labels
area: @schematics/angularfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix