-
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 install removes everything from bower_components directory #616
Comments
Yarn is actually a drop in replacement for bother Bower and npm. Are we correctly populating |
Couldn't find them in
|
@skuridin do they appear in the listing when you run |
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 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 |
nope |
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 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. |
Tried on our project. We have a bower.json + package.json and we have the same behavior. We are also using .bowerrc (output to "libs" folder) and this folder also get removed. As soon as this is fixed, we can transition on our team. |
Ran into a fairly weird version of this bug. My project doesn't use bower, but a collaborator used it once to install a dependency. They made a {
"directory": "js/"
} so that it would be installed in the Deleting extraneous module locations makes a certain amount of sense, but doing so silently (a confirmation before delete would be ideal, but at least logging what's happening would have saved me a fair bit of time) is rather user-unfriendly—at least in edge cases like this one. |
Since yarn 0.16 it's possible to hook in bower install and make this a bit less distracting while we wait for a proper fix. In package.json: {
"scripts": {
"postinstall": "bower install"
}
} |
Same issue here. yarn version 16.1 |
We've removed support for Bower, see #1441. |
Same issue here. Why should I use only bower or yarn? why not both?! I have (old) packages in bower_components/ directory and I want to replace npm with yarn (I can use npm with bower). |
You can use yarn and bower. We just have to wait for a new tag. |
That will be possible with the next release of yarn because Yarn won’t take care of your Bower packages. See #1441 Tip: Use |
OK! I'm sorry!!! 👍 |
I didn't expect this kind of behavior. I was excited about yarn. But after wasting half an hour figuring out where my bower_components go I gave up on yarn. |
Out of curiosity, when will the next, non-bower_components-removing, version of Yarn be released? |
bump |
Please publish the version that fixes bower, this is really blocking here :( |
Just use the workaround with postinstall. Works like a charm. Anyway: bower support will be dropped, so the workaround is your only option. |
@omnisite problem is that |
Ah ok. Well, you can always just edit the package and bower json file. I know "add" is easier, but there is just not much choice if Yarn is dropping support for Bower. |
@omnisite you can do all sort of hacks like run Therefore prompt release would be more than appreciated 😉 Thanks! |
@elmariofredo Yes, I agree. I was bummed also that it did not work out of the box. Still I can work with both with the workaround. And we have no idea when they will fix it. |
@omnisite sure just please mind that OSS is driven by community comments and stating
is IMHO not exactly fitting this case |
@omnisite Your workaround does not work in my case, as bower dependencies are commited within the repo (we don't like to rely on the bower tool on each build as we had issues with it from time to time). yarn deprecating bower support is just fine for me, as long as it does not mess with it. |
Also, it seems to be done already, so why not release? https://github.com/yarnpkg/yarn/pulls?utf8=%E2%9C%93&q=is%3Apr%20is%3Aclosed%20bower |
Yes. It would be cool, if you could release yarn without bower support (and without messing with the bower_components dir). I ran into this problem myself while traveling offline. yarn’s offline mode was the primary reason to use yarn in the first place. Without a local backup I had not been able to restore bower_components. This is serious. The workarounds from the comments above don’t work offline. Thanks! |
@dennisfrank Thanks for saying that. I'm tempted to offer a bounty for someone re-instating and completing bower support. It's still widely used, even if it is being deprecated in a lot of places. And its ability to have repeatable installs is very poor. |
I don't think the biggest problem is missing Bower, it's the unexpected deletion of the bower directory :/ Not really sure why this isn't seen as a critical enough issue to release a new (minor) tag for, this can cause serious problems for someone who isn't using version control. |
@barryvdh Exactly. But even if you you use version control the bower directory often gets ignored on purpose. |
Once this get published, I'm ditching npm for our team. Meanwhile? I'll wait, |
Not sure what is blocking the release or the target eta. With an early library like this it would be better to see them make changes faster. This has been sitting for a month. |
No idea. In the mid time, this is preventing adoption. |
It's released with version 0.17.0 🎉 |
YES. Version 0.17.0 have fixed this. Already upgraded. |
yes... it is true guys. yarn is safe for bower users. thanks yarn team |
Updated yarn to latest with:
Ran Ran You guys rock. We're putting a change in our backlog to change to yarn today. 😄 |
Made with my awesome Paint skillz. |
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
Removes everything from
bower_components
directoryIf the current behavior is a bug, please provide the steps to reproduce.
In a project, that uses both npm and bower, run
yarn
What is the expected behavior?
Install missed modules to
node_modules
and do nothing withbower_components
Please mention your node.js, yarn and operating system version.
macOS 10.12, node 6.6.0, npm 3.10.3, yarn 0.15.1
The text was updated successfully, but these errors were encountered: