ng update
fails with Yarn
#27731
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
<14 probably, not sure as it was a long time ago
Description
While updating a v15 application using Yarn (non-PnP), the
ng update
command fails with an unhelpful error.The error claims there is no
packageManager
field in package.json, which is not true. Even if the field is really missing,ng update
adds it but the next run will throw the same error.The only workaround I found is to use npm to do the update (set
packageManager: "[email protected]"
inpackage.json
, removecli.packageManager
fromangular.json
), and then revert to Yarn after the update.It does not look like a Yarn issue, the behavior is the same with 3.4.1 or 4.2.2.
Minimal Reproduction
corepack enable
npx --package=@angular/cli@15 ng new ng15 --package-manager=yarn
.yarnrc.yml
with content:nodeLinker: node-modules
yarn install
ng update @angular/core@16 @angular/cli@16 --verbose --allow-dirty
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: