Couldn't install phx_gen_auth on phoenix 1.6.2

Hello everyone,

This is a strange situation right here.
I installed app --live, ecto.create, all default 1.6.2 dependencies.
I want to install phx_gen_auth, added {:phx_gen_auth, “~> 0.7”, only: [:dev], runtime: false} to mix.exs, but get an error:

mix deps.get
Resolving Hex dependencies…

Failed to use “phoenix” (version 1.6.2) because
phoenix_live_reload (versions 1.2.0 to 1.3.3) requires ~> 1.4
phoenix_live_view (versions 0.16.0 to 0.16.4) requires ~> 1.5.9 or ~> 1.6.0
phx_gen_auth (version 0.7.0) requires ~> 1.5.2
mix.exs specifies ~> 1.6.2

Well phoenix is already 1.6.2, why do I get this error?

Hey there,

The good news is that the Phoenix auth generators were merged into Phoenix 1.6. So, you can just run the phx.gen.auth commands without installing any extra deps. I assume that trying to install the separate package intentionally throws an error for versions above 1.5.

Hope this helps!


wow, thanks! I will immediately give it a try

upd: it works, thanks!


What is a good place to track new inclusions (in 1.6.2) like these? Release docs, etc.?

Check out the changelog on GitHub. Big kudos to the Phoenix team for providing very clear details on the updates and changes for each release - I’m sure that is a monumental task in addition to maintaining the entire framework.

It is very comprehensive, but it is definitely easy to miss.

1 Like

Thanks for the share!