Gist example recompile exception · GitHub
Runtime (works)
mix phx.server
- Write an incorrect class
<body class={class(["bg-wh ite", "dark:bg-gray-900"])}>
and it will raise an error in runtime (as expected).
- Fix the class back, the page will reload (as expected).
Mix compile (doesn’t work)
mix phx.server
is not running.
- Write an incorrect class
<body class={class(["bg-wh ite", "dark:bg-gray-900"])}>
.
- Start
mix phx.server
, and it will raise an error. (as expected)
- Fix the class back to
<body class={class(["bg-white", "dark:bg-gray-900"])}>
.
- Run
mix phx.server
, and only PhoenixAssetPipelineExampleWeb.Layout
will be recompiled, and you will get an error:
no "root" html template defined for PhoenixAssetPipelineExampleWeb.Layouts (the module does not exist).
1 Like
On mobile so can’t try the code provided. Two questions though:
- Where is the error at 2. shown? Iex console or…?
- Is there a LSP server running?
Not related to LSP
mix phx.server
in cmd
no “root” html template defined for PhoenixAssetPipelineExampleWeb.Layouts (the module does not exist). in runtime
What is the first ‘it’ in point two or is this the same ‘it’ as in 3 (phx.server)?
same raise
, corrected in issue
Elixir 1.18.1 fixes issue