[BUG] Unable to update peer dependencies in workspaces #4851
Labels
Bug
thing that needs fixing
Priority 2
secondary priority issue
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I've setup a root package with a single workspace, and in that workspace I've installed React and another dependency that has defined a peer dependency on the same version of React. That version of React gets hoisted to the root node_modules and everything works as expected. If I then try to upgrade React, npm will leave that version intact and install the new version in the nested node_modules inside the workspace, leaving the other dependency using the old version of React with seemingly no way to upgrade it.
Expected Behavior
I would expect that when I upgrade the version of React that I installed, that this would update the version in the root node_modules to also be used by other dependencies that have specified React as a peer dependency, rather than installing a separate version in the nested node_modules for the workspace.
Steps To Reproduce
Environment
The text was updated successfully, but these errors were encountered: