I’m starting a new Phoenix project with Inertia. It only needs root.html.heex. Therefore, I deleted app.html.heex. Unfortunately, this error shows up upon deletion:
no "app" html template defined for ExampleWeb.Layouts (the module exists but does not define app/1 nor render/2)
Any ideas why this happens? Is there another place where app layout is used?
If you’re not using LiveView I’d skip the root layout and use just “layouts”. Root layouts were only introduced because LiveView needed the split between layout parts handled by LV and all the html boilerplate around it.
out of curiosity, where did you find the version mismatch? did you start a new project with the older version?
coz i’m running into the same issue, where i upgraded a 1.7 to 1.8, but it still had to do a put_layout :false to make it stop looking for an app layout
Yep, I accidentally had an older version of phx_new, which therefore was generating older Phoenix projects. Had to do mix archive.install hex phx_new to update it and then make a new project.
I noticed the version mismatch while reading the Phoenix source code. The comment mentioned 1.9 while my local version was 1.7 (1.8 is the current stable)
Regarding your question, I see these changes in project template from 1.7 to 1.8:
in my case i have removed the layouts from the use Phoenix.Controller bits, but turns out i also need to remove the namespace args on it. looking it at the source, it is also used to derive the layout module