Module Phoenix.View is not loaded and could not be found

Losing my sanity here…

Using Phoenix 1.7.0-rc.0 with liveview 0.18.3.

Everything was fine, and suddently, I get error messages containing module Phoenix.View is not loaded and could not be found.

Figured out I had to replace all occurences of Phoenix.View by Phoenix.Template since 1.7, so I did it. Now I get these:

no "live" html template defined for MyAppWeb.LayoutView

Any help appreciated, thanks!


Added {:phoenix_view, "~> 2.0"} and it now works…

Isn’t this thing supposed to be outdated?

I guess I forgot to update something in the project…



Now I am facing the same symptom even though I added {:phoenix_view, "~> 2.0"}

== Compilation error in file lib/location_service_web/views/stats_view.ex ==
** (CompileError) lib/location_service_web/views/stats_view.ex:2: module Phoenix.Component 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: LocationServiceWeb.__using__/1
    lib/location_service_web/views/stats_view.ex:2: LocationServiceWeb.StatsView (module)
    (elixir 1.14.4) expanding macro: Kernel.use/2

Need to add {:phoenix_live_view, "~> 0.18"} to fix the problem.