-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid dependencies inside nested node_modules #4590
Comments
I can confirm similar behavior beginning in yarn I am using:
I find that with yarn |
This seems to be related to (a duplicate of?) #4539 |
I think this can be closed now that yarn 1.2.1 is released. It has fixed the problem in my case at least. |
@IanVS Then, I simply need another issue. Yarn 1.2.1 don't resolve my issue. You can reproduce that within a few minutes from my link. |
@karak, yeah, I'd recommend opening another issue, because I don't think it's related to this one. |
@IanVS I did it, thank you. |
updating to 1.2.1 does fix the issue. |
This is my package.json:
grommet-icons
library still uses React 15.X, whileenzyme
andenzyme-adapter-react-16
uses React 16.enzyme-adapter-react-16
has a dependency onenzyme-adapter-utils
which has the following values for peerDependencies:When I run
npm install
I have the following structure inside my node_modules:This feels right to me and I can run my application tests without any problems.
On the other hand, when I run
yarn install
I get a different output:This is breaking enzyme with the following output:
Manually removing the
enzyme-adapter-utils/node_modules/react
resolves the problem.I believe Yarn is resolving peerDependencies differently than NPM. It seems to me that YARN finds the first match anywhere in the dependency tree (notice that React 15 is NOT a peerDependency of enzyme-adapter-utils).
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
Yarn uses React 15 as a peerDependency of
enzyme-adapter-utils
What is the expected behavior?
Yarn should not use React 15 as a peerDependency of
enzyme-adapter-utils
To reproduce this problem just run
npm install
and check the content ofnode_modules/enzyme-adapter-utils
. You can see that there is no node_modules folder. When runningyarn install
this folder will be present withreact
15 inside it.Please mention your node.js, yarn and operating system version.
Node: 6.11.x
Yarn: 1.1.0
OSx 10
The text was updated successfully, but these errors were encountered: