Deps issue: (Mix) Hex dependency resolution failed, relax the version requirements or unlock dependencies

(Mix) Hex dependency resolution failed, relax the version requirements or unlock dependencies

I have faced the issue when you add new dependancy to your Elixir project and appeared it used different version of some deps (because developer fixed deps version).

I added nadia Telegram API Wrapper bleeding edge version from github (not good imho, but they had new cool code in the master) and I got this error message:

mix deps.update --all
* Updating nadia (https://github.com/zhyu/nadia.git)
From https://github.com/zhyu/nadia
 + 46d7b97...f91ed3f master     -> origin/master  (forced update)
Running dependency resolution
Conflict on poison from 2.0.0 to 2.1.0
  deps/nadia/mix.exs: ~> 2.0
  phoenix 1.1.4: ~> 1.5 or ~> 2.0
  phoenix_ecto 2.0.0, 2.0.1: ~> 1.3

** (Mix) Hex dependency resolution failed, relax the version requirements or unlock dependencies

The hotfix for this issue is adding explicitly poison dependancy like this:

     {:poison, ">= 0.0.0", override: true},

this means it takes max version of the poison and use over all the versions.