ng update
doesn't work with Yarn PnP
#26505
Labels
area: @angular/cli
freq1: low
Only reported by a handful of users who observe it rarely
ng update DX
severity3: broken
type: bug/fix
Command
update
Is this a regression?
The previous version in which this bug was not present was
No response
Description
When running
ng update <library>
in a project that uses Yarn PnP, the command fails with the following errorPackage '@angular/material' is not a dependency.
This was reported in the PnP support status thread and a work around listed here #16980 (comment)
The workaround requires temporarily disabling PnP, running the update, and then re-enabling PnP, which is not a great experience.
Minimal Reproduction
Run
ng update @angular/core
in a project that's set up with Yarn pnp.Exception or Error
Your Environment
Anything else relevant?
I believe the code responsible for this issue is this utils function that gathers all dependencies from the project's package.
https://github.com/angular/angular-cli/blob/main/packages/angular/cli/src/utilities/package-tree.ts#L53-L86
The text was updated successfully, but these errors were encountered: