How can I specify multiple dependencies that have the same name?

I have an app inside an umbrella project. It has the following dependency specified in the mix.exs file.

{:uuid, "~> 1.1"}

Another dependency is also using a different pakage called uuid. Because of this, when I do mix deps.get the following error happens.

Dependencies have diverged:
* uuid (Hex package)
  different specs were given for the uuid app:

  > In apps/dedup/mix.exs:
    {:uuid, "~> 1.1", [env: :prod, hex: :uuid, override: true]}

  > In deps/cqerl/rebar.config:
    {:uuid, ~r/.*/, [env: :prod, git: "https://github.com/okeuday/uuid.git", tag: "v1.4.1", manager: :rebar]}

  Ensure they match or specify one of the above in your deps and set "override: true"
** (Mix) Can't continue due to errors on dependencies

How can I solve this?

1 Like

Long story short: you can’t.

4 Likes