What I Wanted to Do
Remove a peer dependency and get it back when reinstall packages
What Happened Instead
When I reinstall all packages (npm i), the peer dependency was not reinstalled
I’ll use Firebase and angularfire to show. In any npm project folder:
$ npm install angularfire $ npm uninstall firebase <!-- peer dependency from angularfire --> $ npm install
Look that the firebase dependency was not installed again.
My suggestion is to allow remove explicit only dependencies on package.json (yarn behavior). Unnecessary inconsistencies can be avoided with this.
But, if community like/use that feature, updating package-lock when a peer dependency is removed must do the job.
OS: Manjaro Linux