(Mix) Hex dependency resolution failed
Problem Description:
I’m new to phoenix and elixir… I’m trying to get the dependencies and when I run the following command, I get the error. Am I missing something? Still trying to figure it out what the actual error means?
mix deps.get ueberauth_auth0
Resolving Hex dependencies...
#Incompatibility<#Term, cause: {:conflict, #Incompatibility<#Term<ueberauth_auth0 >= 0.4.0>, cause: {:conflict, #Incompatibility<#Term<ueberauth_auth0 >= 0.4.0>, #Term<not oauth2 ~> 2.0>, cause: :dependency>, #Incompatibility<#Term, #Term<not oauth2 ~> 0.5>, cause: :dependency>}>, #Incompatibility<#Term, #Term<not ueberauth_auth0 ~> 2.1.0>, cause: :dependency>}> Resolution completed in 0.822s Because ueberauth_auth0 >= 0.4.0 depends on oauth2 ~> 2.0 and your app depends on oauth2 ~> 0.5, ueberauth_auth0 >= 0.4.0 is forbidden. So, because your app depends on ueberauth_auth0 ~> 2.1.0, version solving failed.
Solution – 1
You seem to bump the version of the library to the patch (~> 0.4.0
) in your mix.exs
file, which effectively allows 0.4.0 ≤ version < 0.5.0
and ueberauth
itself to 2.0
or like.
Make it less restrictive: start with mix hex.info ueberauth_auth0
, figure out what is the best suited version to eliminate a conflict and bump it in your mix.exs
to that value.
Solution – 2
I have override the plugin and the error disappeared.
{:ueberauth_auth0, "~> 2.1.0", override: true}
Thanks