-
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
yarn 1.0.1 is generating extraneous dependencies #4417
Comments
Yarn and npm have different resolution algorithms so it is normal for npm to think there are extra packages. Would you mind if I ask you why you are using |
We're using this script: https://github.com/whitesource/npm-plugin which internally calls npm (https://github.com/whitesource/npm-plugin/blob/68a400e00ea5365b9b0e2afd2aa616afbdaa9d10/bin/whitesource.js#L234) Our company requires us to submit dependencies using this tool... |
@BYK also I don't think Yarn's behaviour is correct. The nyc package.json has |
@camwest yarn doesn't guarantee compatibility with For the actual, potential bug, are you saying that Yarn incorrectly installs |
OK fair enough about the workflow point. Regarding the bug. You'll see two sets of dependencies installed.
Notice how nyc/node_modules directory contains a second set of node_modules. My guess is due to them using |
Yeah, looks like a bug to me too. Thanks for the report. Will investigate more. |
I might be able to help fix. Is there a place you can point me to that handles bundledDependencies? |
@camwest there's this code: https://github.com/yarnpkg/yarn/blob/master/src/package-linker.js#L110-L128 and https://github.com/yarnpkg/yarn/blob/master/src/package-linker.js#L415-L417 but I don't think we do anything extra for bundledDependencies which is probably what we should do. |
Related: #4532. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Running yarn introduces an extraneous dependency. This causes npm ls to subsequently return non-zero exit code which is breaking our CI system.
If the current behavior is a bug, please provide the steps to reproduce.
package.json
yarn
npm ls
echo $?
It outputs 1 because of extraneous dependencies:
What is the expected behavior?
Expected no extraneous dependencies or npm ls to return with a 0 exit code.
Please mention your node.js, yarn and operating system version.
node v6.11.1
yarn v1.0.1
macOS Sierra 10.12.6
The text was updated successfully, but these errors were encountered: