Phoenix.View is not loaded when trying to install Oban Web 2.10.0-rc.3

Hi there, I’m running into an issue when trying to upgrade my Oban Web package from 2.9.7 → 2.10.0-rc.3

I’m following the instructions here: Installation — Oban Web v2.10.0-rc.3 and as the instructions state, I need Phoenix Live View which I already have installed from the instructions here:
Installation — Phoenix LiveView v0.20.1

My deps are:
{:oban, “~> 2.10.0-rc.3”},
{:oban_web, “~> 2.10.0”, repo: “oban”},
{:oban_pro, “~> 1.0”, repo: “oban”},
{:phoenix_live_view, “~> 0.16”, override: true},

But I keep getting this error:

== Compilation error in file lib/broadcast_web/live/feature_flag_live.ex ==
** (CompileError) lib/broadcast_web/live/feature_flag_live.ex:2: module Phoenix.View is not loaded and could not be found. This may be happening because the module you are trying to load directly or indirectly depends on the current module
    expanding macro: BroadcastWeb.__using__/1
    lib/broadcast_web/live/feature_flag_live.ex:2: BroadcastWeb.FeatureFlagLive (module)
    (elixir 1.13.4) expanding macro: Kernel.use/2

Any help would be appreciated, thank you!

If and when the app does compile, I get this error from the Dialyzer

lib/broadcast_web/views/auth_view.ex:0:unknown_function
Function Phoenix.View.__not_found__!/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/auth_view.ex:4:unknown_function
Function Phoenix.View.__not_found__!/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/auth_view.ex:4:unknown_function
Function Phoenix.View.render/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/error_view.ex:0:unknown_function
Function Phoenix.View.__not_found__!/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/error_view.ex:2:unknown_function
Function Phoenix.View.render/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/health_view.ex:0:unknown_function
Function Phoenix.View.__not_found__!/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/health_view.ex:2:unknown_function
Function Phoenix.View.__not_found__!/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/health_view.ex:2:unknown_function
Function Phoenix.View.render/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/layout_view.ex:0:unknown_function
Function Phoenix.View.__not_found__!/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/layout_view.ex:2:unknown_function
Function Phoenix.View.__not_found__!/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/layout_view.ex:2:unknown_function
Function Phoenix.View.render/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/page_view.ex:0:unknown_function
Function Phoenix.View.__not_found__!/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/page_view.ex:2:unknown_function
Function Phoenix.View.__not_found__!/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/page_view.ex:2:unknown_function
Function Phoenix.View.render/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/waitlist_view.ex:0:unknown_function
Function Phoenix.View.__not_found__!/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/waitlist_view.ex:2:unknown_function
Function Phoenix.View.__not_found__!/3 does not exist.
________________________________________________________________________________
lib/broadcast_web/views/waitlist_view.ex:2:unknown_function
Function Phoenix.View.render/3 does not exist.
________________________________________________________________________________
done (warnings were emitted)
Halting VM with exit status 2

If that’s helpful!

You’re overriding the LiveView dependency with a much older version that isn’t supported. Web v2.10+ depends on LiveView v0.19+. You’ll need to upgrade LiveView as well.

2 Likes

Thanks @sorentwo! That worked, you’ve saved my job yet again :pray: