How to upgrade to phoenix live view 0.15.3

Hey guys,

I’m having problem to upgrade my dependencies. I want to use the allow_upload function in my liveview pages. My current configuration use:

{:phoenix_live_view, "~> 0.14.0"}

when I tried to update to

{:phoenix_live_view, "~> 0.15.3"}

and use mix deps.get then I got the next error:

Failed to use "phoenix" (versions 1.4.9 to 1.4.17) because
  apps/purple_interface/mix.exs requires ~> 1.4.9
  phoenix_live_reload (version 1.2.2) requires ~> 1.4
  phoenix_live_view (version 0.15.3) requires ~> 1.5.7

** (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}

then I tried to update from {:phoenix, β€œ~> 1.4.9”} to {:phoenix, β€œ~> 1.5.7”}

and I got this another error:

Failed to use "phoenix_pubsub" (versions 1.1.0 to 1.1.2) because
  apps/purple_engine/mix.exs requires ~> 1.1
  apps/purple_interface/mix.exs requires ~> 1.1
  phoenix (version 1.5.7) requires ~> 2.0

** (Mix) Hex dependency resolution failed, change the version requirements of your dependencies or unlock them (by using mix dep

anyway, I tried to update phoenix_pubsub and so on until reach {:scrivener_html, β€œ~> 1.8”} in some point I start looping around.

Is there a way to upgrade from {:phoenix_live_view, β€œ~> 0.14.0”} ro {:phoenix_live_view, β€œ~> 0.15.3”} without a lot of pain??

Thanks in advance.

Yes, follow the steps to update from Phoenix 1.4 to 1.5… the rest will follow.

1 Like

Thanks @kokolegorille

I follow all the instructions and I realize that I have in my project a dependency called {:scrivener_html, β€œ~> 1.8”} that is not compatible with phoenix 1.5. In this moment I think I have two options: to delete that dependency and use another dependency for pagination or wait to see what other ideas the elixir community has. For now, I’m going to wait a couple of days and see what’s happen.

scrivener_html seems to be abandoned. I cloned it into a private repo and upgraded the dependencies. Based on that I copied the relevant code and eliminated the configurable parts.
The rest that stayed is small enough to maintain with the project.

1 Like

Thanks for your comment @ouven. I’m going to use your technique. =)

I am facing the same issues.

I had the Phoenix updated to Phoenix 1.5,

but when i change the phoenix_live_view from 0.12.0 to 0.17.2. Im getting the following error:

an exception was raised:
** (Mix.Error) 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}
(mix 1.12.3) lib/mix.ex:455: Mix.raise/2
(hex 0.21.2) lib/hex/remote_converger.ex:60: Hex.RemoteConverger.converge/2
(mix 1.12.3) lib/mix/dep/converger.ex:95: Mix.Dep.Converger.all/4
(mix 1.12.3) lib/mix/dep/converger.ex:51: Mix.Dep.Converger.converge/4
(mix 1.12.3) lib/mix/dep/fetcher.ex:16: Mix.Dep.Fetcher.all/3
(mix 1.12.3) lib/mix/tasks/deps.get.ex:31: Mix.Tasks.Deps.Get.run/1
(mix 1.12.3) lib/mix/task.ex:394: anonymous fn/3 in Mix.Task.run_task/3
(language_server 0.8.1) lib/language_server/build.ex:271: ElixirLS.LanguageServer.Build.fetch_deps/0ElixirLS

Hello and welcome,

Please show you list of dependencies and their version numbers.

This should be in mix.exs.

Hi! I have solved the issue!

Turns out phoenix live view 1.6 and above requires phoenix 1.6

I uninstalled the phoenix 1.5 and installed 1.6 then it solves it all