Command
update
Is this a regression?
The previous version in which this bug was not present was
22.0
Description
ng update fails with "Cannot read properties of undefined (reading 'filter')" when using npm 12.x
Command
update
Is this a regression?
Yes — ng update worked correctly with npm 11.x. The issue appears with npm 12.x.
Description
Running ng update to migrate from Angular 22.0.x to 22.1.x fails consistently with the following error:
Using package manager: npm
Collecting installed dependencies...
Found 24 dependencies.
Fetching dependency metadata from registry...
Cannot read properties of undefined (reading 'filter')
The error occurs during the "Fetching dependency metadata from registry..." step, regardless of which packages are passed as arguments. Even a single-package invocation (ng update @angular/core@22.1) reproduces it.
The workaround is to downgrade npm to 11.x (npm i -g npm@11.12.1), after which ng update completes successfully.
Workaround
Downgrade npm to 11.x before running ng update:
bash
npm i -g npm@11.12.1
Minimal Reproduction
Ensure npm 12.x is installed (ships as default with Node.js 24.x)
Have an Angular 22.0.x project
Run: ng update @angular/core@22.1 @angular/cli@22.1
Observe the crash after "Fetching dependency metadata from registry..."
Exception or Error
Using package manager: npm
Collecting installed dependencies...
Found 24 dependencies.
Fetching dependency metadata from registry...
Cannot read properties of undefined (reading 'filter')
Your Environment
Angular CLI : 22.1.0 (also reproduced with local 22.0.8 + temporary CLI 22.1)
Node.js : 24.18.0
npm : 12.0.1
OS : win32 x64
TypeScript : 6.0.3
Anything else relevant?
The crash is silent — no stack trace is printed, only the one-liner error message. --verbose does not produce additional output.
The issue affects any invocation of ng update that reaches the metadata fetch step — it is not specific to a particular package or migration schematic.
npm 12 introduced changes to the package metadata format returned by the registry client. The filter call on undefined suggests the CLI's dependency collector is not handling the new metadata shape correctly.
Related Stack Overflow report (opened 2026-07-30): https://stackoverflow.com/questions/79988033/angular-22-1-update-failing-cannot-read-properties-of-undefined-reading-filter
Command
update
Is this a regression?
The previous version in which this bug was not present was
22.0
Description
ng update fails with "Cannot read properties of undefined (reading 'filter')" when using npm 12.x
Command
update
Is this a regression?
Yes — ng update worked correctly with npm 11.x. The issue appears with npm 12.x.
Description
Running ng update to migrate from Angular 22.0.x to 22.1.x fails consistently with the following error:
The error occurs during the "Fetching dependency metadata from registry..." step, regardless of which packages are passed as arguments. Even a single-package invocation (ng update @angular/core@22.1) reproduces it.
The workaround is to downgrade npm to 11.x (npm i -g npm@11.12.1), after which ng update completes successfully.
Workaround
Downgrade npm to 11.x before running ng update:
bash
npm i -g npm@11.12.1
Minimal Reproduction
Ensure npm 12.x is installed (ships as default with Node.js 24.x)
Have an Angular 22.0.x project
Run: ng update @angular/core@22.1 @angular/cli@22.1
Observe the crash after "Fetching dependency metadata from registry..."
Exception or Error
Your Environment
Anything else relevant?
The crash is silent — no stack trace is printed, only the one-liner error message. --verbose does not produce additional output.
The issue affects any invocation of ng update that reaches the metadata fetch step — it is not specific to a particular package or migration schematic.
npm 12 introduced changes to the package metadata format returned by the registry client. The filter call on undefined suggests the CLI's dependency collector is not handling the new metadata shape correctly.
Related Stack Overflow report (opened 2026-07-30): https://stackoverflow.com/questions/79988033/angular-22-1-update-failing-cannot-read-properties-of-undefined-reading-filter