I installed Phoenix 1.7-rc along with Elixir 1.14.1 and Erlang/OTP 24. I then created a new project using mix phx.new
command. The compilation fails with the following error:
Unchecked dependencies for environment dev:
* phoenix (Hex package)
the dependency phoenix 1.7.0-rc.0
> In apps/trial_web/mix.exs:
{:phoenix, "~> 1.7.0-rc.0", [env: :prod, repo: "hexpm", hex: "phoenix", override: true]}
does not match the requirement specified
> In deps/phoenix_live_view/mix.exs:
{:phoenix, "~> 1.6.15 or ~> 1.7.0", [env: :prod, hex: "phoenix", repo: "hexpm", optional: false]}
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
This is how the dependency is defined in mix.exs
{:phoenix, "~> 1.7.0-rc.0", override: true},
Since the override: is set to true, my understanding is that it should override any other definitions of itself by other dependencies.
What am I missing?
Edit:
As @delameko pointed out, I am working with an umbrella project, and once I remove phoenix_live_view
dependency from the root mix.exs
, I can compile. However, it is not ideal, as I lose the ability to run mix format
on heex files from the root project.
Edit 2: Since phoenix_live_view
is required to run "mix format" on ~H/.heex files from the umbrella root and it depends on the phoenix
, after I add phoenix
on the root mix.exs
, the project compiles.