BlogappWeb.PageLive not compiling due to BlogappWeb.Router.Helpers not being loaded

Hello. My goal is to create a simple blogapp with a minimal frontend in phoenix liveview but keep encountering these problems in my page_live.ex file -

Compiling 1 file (.ex)
error: module BlogappWeb.Router.Helpers is not loaded and could not be found
  lib/blogapp_web/live/page_live.ex:6: BlogappWeb.PageLive (module)


== Compilation error in file lib/blogapp_web/live/page_live.ex ==
** (CompileError) lib/blogapp_web/live/page_live.ex: cannot compile module BlogappWeb.PageLive (errors have been logged

Now, I have made sure that my routes in router.ex are correct so I dont know what the issue is

Hello and welcome

There is a change since Phoenix 1.7 concerning routes…

https://hexdocs.pm/phoenix/Phoenix.VerifiedRoutes.html

You still can use Router.Helpers, but it is not active by default in 1.7

1 Like

Thank you. I will have a look at it and adjust accordingly.