Programming Phoenix LiveView: P27, live_path confusion

Re-posting here for visibility bc I accidentally replied privately:

Mystery solved!

At the top of your PentoWeb.WrongLive module, you should pull in the LiveView behavior like this:

defmodule PentoWeb.WrongLive do
  use PentoWeb, :live_view

I think there was someplace in the book where we gave you an outdated instruction to do so like this instead:

defmodule PentoWeb.WrongLive do
  use Phoenix.LiveView

That has since been corrected but I’m not sure if the fix is out in the Beta release from last week or if it will be included in the next one. In either case, that is the change you need to make and I’m sorry for any confusion this caused!

Let me know if this un-sticks you or if you encounter any other errors :slight_smile:
And @cro confirmed this fixed the issue!

1 Like