rharriso / bower-rails

Bundler-like DSL + rake tasks for Bower on Rails
MIT License
1.46k stars 128 forks source link

Bower.json never resolved #125

Open tejasmanohar opened 9 years ago

tejasmanohar commented 9 years ago

https://github.com/edallies/edallies/blob/master/bower.json

![screenshot]http://i.imgur.com/MJYGxud.png)

I entered !2, tested a few times in fact, and when I ran bundle exec rake bower:install the next time, none of these changes persisted to bower.json apparently since it asked me the same question in screenshot again. How do I resolve this conflict?

SergeyKishenin commented 9 years ago

You can try to use -F flag: Force latest version on conflict with rake bower:install['-F']

tejasmanohar commented 9 years ago

@SergeyKishenin Doesn't seem to do the correct modifications to my bower.json file because even after running it that way and then running it with bundle exec rake bower:install, I get the same error that's in the screenshot. What modification is needed to bower.json to get rid of the conflict?

OneHoopyFrood commented 8 years ago

Confirmed. This is happening for me too.

Normally when you choose an option bower will insert this 'resolutions' section into the bower.json like so (my trouble is with font-awesome):

"resolutions": {
  "font-awesome": "~4.5.0"
}

However, because of the unique bower.json structure this won't work normally and bower must be unable to figure out where to add this declaration. If this is manually placed at the same level as the "lib" and "vendor" then the following error results: dis

However if it's placed in the corresponding "lib" or "vendor" section then it operates as expected

"vendor": {
  "name": "bower-rails generated vendor assets",
  "dependencies": {
    "font-awesome": "~4.5.0",
    "bootstrap-social": "~4.9.1" // Conclicts with above
  },
  "resolutions": {
    "font-awesome": "~4.5.0"
  }
}