2

I am trying to update my liveview from v0.17.5 to v0.18.16. I put this in my mix.exs file:

{:phoenix_live_view, "~> 0.18.16"},
{:floki, ">= 0.30.0", only: :test}

but I get error

Because your app depends on phoenix_live_view empty which doesn't match any versions, version solving failed.

Is this problem known and is there a workaround?

Aleksei Matiushkin
  • 119,336
  • 10
  • 100
  • 160
paulrusu
  • 117
  • 1
  • 7
  • I cannot reproduce in a new mix project. Please provide your full mix.exs. – Adam Millerchip Mar 01 '23 at 11:58
  • Just to be thorough, I would try deleting your `mix.lock`, your `deps/` and `_build/` directories and try `mix deps.get` again to verify that the issue persists. One step further would be to remove the local hex cache (usually stored at `~/.hex/`). – Everett Mar 01 '23 at 12:54
  • @paulrusu, Can you send your entire mix.exs deps function? I suspect there could be a typo somewhere. That would give more insights into what could be the problem. – Kamaro Mar 02 '23 at 08:30
  • Is there maybe an issue with the fact that the project is still running elixir v. 1.12 ? – paulrusu Mar 04 '23 at 17:22

2 Answers2

1

Bumped upon a similar while manually upgrading Phoenix with

{:phoenix_live_view, "~> 0.18.16"}, switching to {:phoenix_live_view, "~> 0.19.0"}.

The error for mix deps.get was:

Resolving Hex dependencies...
Resolution completed in 0.041s
Because "your app" depends on "phoenix_live_view empty" which doesn't match any versions, version solving failed.
** (Mix) Hex dependency resolution failed

Running mix deps.tree actually helped to see that one of my direct dependencies had {:phoenix_live_view, "~> 0.18.18"}, and after also upgrading it also to 0.19.0 the issue was gone.

Hope that helps

aiwaiwa
  • 11
  • 1
0

I have a similar symptom when I upgrade phoenix_live_view from 0.17.5 to 0.18.16

$ mix deps.get
Resolving Hex dependencies...
Resolution completed in 0.105s
Because "the lock" depends on "phoenix_live_dashboard 0.6.5" which depends on "phoenix_live_view ~> 0.17.7", "the lock" requires "phoenix_live_view ~> 0.17.7".
And because "your app" depends on "the lock", "phoenix_live_view ~> 0.17.7" is required.
So, because "your app" depends on "phoenix_live_view ~> 0.18.16", version solving failed.
** (Mix) Hex dependency resolution failed

Remove mix.lock, run mix clean and mix deps.get would help to fix the issue.