running Endpoint terminated; UndefinedFunctionError

It’s my first question here. Actually I’m doing a Pento project through Programming Phoenix LiveView book. I’m getting this error

[error] #PID<0.590.0> running PentoWeb.Endpoint (connection #PID<0.575.0>, stream id 4) terminated
Server: localhost:4000 (http)
Request: GET /guess
** (exit) an exception was raised:
    ** (UndefinedFunctionError) function WrongLive.__live__/0 is undefined (module WrongLive is not available)

And I need a help to fix it.Thank you in advance

This likely means you told the router a module was a LiveView, but that module didn’t contain the correct use statement. Check your wrong_live.ex file.

Alternatively, you may not have referred to the module with an accurate name - is the module actually PentoWeb.WrongLive? Check your router.ex file.


I checked router.ex and I found that I had a two same live routes on two different places and when it matches first one, second one that is more important, fails. I made that mistake while trying different things through reading a book. Thank you very much for your answer!