Can't user liveview template collocation

I’m trying to use the template collocation feature that alows to put a template file along a liveview file in the same directory, instead of putting the template in a dedicated templates/lv … directory tree.
I’m appealed by this feature but I can’t make it work.

Steps :
1/ Have commented out the render in the liveview code
2/ Moved and renamed the template next to the liveview file


render/1 was not implemented for MsimWeb.LV.Worlds.Index.
Make sure to either explicitly define a render/1 clause with a LiveView template:
def render(assigns) do

Or create a file at “lib/msim_web/live/worlds/index.html.leex” with the LiveView template.

Here is the proof the file actually exists:

head lib/msim_web/live/worlds/index.html.leex
<%= if @watcher do %>

Can you help me understand where I broke it ?

Thank you

Can you try to delete the _build project and see if you still get the same error? rm -rf _build

1 Like

That was the issue. Thank you very much.