Reputation: 967
I'm using Rush to manage a monorepo, in which multiple packages depend on react-redux
. They both specify the exact same version in their package.json file.
Project B also depends on Project A.
I would expect that since they both use the exact same package version, that they would both link to the same folder in common/temp/node_modules/.pnpm. But instead they are linked to two different folders, with some random string (maybe a hash?) appended:
This breaks things since Package B creates the redux <Provider>
but when it calls functions from Package A, they look for the context created by one of the versions of react-redux but Package B initialised the provider with the other version.
Why is Rush making two copies of this same version? How can I prevent it from doing this and make both packages point to the same copy?
Upvotes: 2
Views: 944