ng update --migrateOnly with pnpm doesn't recognize installed packages #15294
Labels
area: @angular/cli
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Milestone
🐞 Bug report
Command (mark with an
x
)Is this a regression?
No (AFAIK)
Description
ng update --migrateOnly
checks that the package is installed prior to performing migrations. However it ignores packages installed as symlinks. Sincepnpm
installs all packages as symlinks, it always (incorrectly) claims the package is not installed.I am able to work around this issue by modifying
findNodeDependencies
innode_modules/@angular/cli/utilities/package-tree.js
to remove the!child.isLink
check.🔬 Minimal Reproduction
First, create an Angular app with
angular.json
including"cli": {"packageManager": "pnpm"}
, and ensure all packages are installed.Then run (for example):
./node_modules/.bin/ng update --from 7.1.4 --migrateOnly @angular/common
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
Nope.
The text was updated successfully, but these errors were encountered: