Using phonenix as web frontend for my service in umpbrella project

Both use Poison, so I’m getting this message:

Resolving Hex dependencies…

Failed to use “poison” (versions 4.0.0 and 4.0.1) because
apps/cryptox/mix.exs requires ~> 4.0
phoenix (version 1.3.4) requires ~> 2.2 or ~> 3.0

** (Mix) Hex dependency resolution failed, change the version requirements of your dependencies or unlock them (by using mix deps.update or mix deps.unlock). If you are unable to resolve the conflicts you can try overriding with {:dependency, “~> 1.0”, override: true}

Tried adding “override: true”, running mix deps.unlock --all and mix deps.update --all, but still getting this message.

:overrides are only respected when set in the top-most application, so you need to put the :override in the umbrellas mix.exs.

Did you do that already, or did you add the :override in the child application?

One thing to note is that Poison 4.0 introduced breaking changes that make it incompatible with Phoenix and Ecto - they both require an encode_to_iodata/1 function that was removed in the 4.0 release.

1 Like

No, in the umbrellas mix.exs deps is empty list

What to do then ? Use 3.x ?

Try and use Jason instead of Poison, if you can do so without your code breaking.

1 Like