Yarn install removes everything from bower_components directory #616
Yarn is actually a drop in replacement for bother Bower and npm. Are we correctly populating bower_components? Can you check node_modules to see if we're accidentally putting them in there instead?
Can you check node_modules to see if we're accidentally putting them in there instead?
Couldn't find them in node_modules.
git status after executing yarn (it removes event .gitignore):
deleted: bower_components/.gitignore
deleted: bower_components/jquery-ujs/.bower.json
deleted: bower_components/jquery-ujs/CHANGELOG.md
deleted: bower_components/jquery-ujs/MIT-LICENSE.txt
deleted: bower_components/jquery-ujs/README.md
deleted: bower_components/jquery-ujs/bower.json
deleted: bower_components/jquery-ujs/src/rails.js
deleted: bower_components/jquery.payment/.bower.json
deleted: bower_components/jquery.payment/.gitignore
deleted: bower_components/jquery.payment/.travis.yml
deleted: bower_components/jquery.payment/Cakefile
deleted: bower_components/jquery.payment/LICENSE
deleted: bower_components/jquery.payment/README.md
deleted: bower_components/jquery.payment/bower.json
deleted: bower_components/jquery.payment/example/index.html
deleted: bower_components/jquery.payment/lib/jquery.payment.js
deleted: bower_components/jquery.payment/package.json
deleted: bower_components/jquery.payment/payment.jquery.json
deleted: bower_components/jquery.payment/src/jquery.payment.coffee
deleted: bower_components/jquery.payment/test/index.coffee
Same thing here, it appears that bower_components is completely emptied out. I see some of the files in the node_modules folder, but not the majority of them, matching what I see from yarn ls, I think it might be coincidence that some packages match? Running v0.15.1 on a mac.
If yarn interacts with bower, could that be in the documentation somewhere? I can't even find the word "bower" in the docs. And it only shows up in any description in the repo here
I made a very simple repo to demonstrate this issue with a single bower.json and a single package.json dependency: https://github.com/RustyToms/yarn-issue-616
What seems to be happening here is bower is being added as a registry. All the folders in the registries, including bower_components are being set as possibleExtraneous. Then, if those files weren't included in the files that yarn is building, they are deemed to be actually extraneous and are deleted.
The main problem seems to be that bower.json dependencies don't seem to be properly loaded into the set of dependencies that yarn is collecting.


Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
Removes everything from
bower_componentsdirectoryIf the current behavior is a bug, please provide the steps to reproduce.
In a project, that uses both npm and bower, run
yarnWhat is the expected behavior?
Install missed modules to
node_modulesand do nothing withbower_componentsPlease mention your node.js, yarn and operating system version.
macOS 10.12, node 6.6.0, npm 3.10.3, yarn 0.15.1