Alex-Njoroge
Phoenix liveview import not working: error: module Phoenix.LiveView.HTML is not loaded and could not be found
Hello everyone I have an issue.
I am creating a simple blogapp with a minimal frontend in phoenix liveview but I keep getting this error in my layouts.ex file.
mix compile
Compiling 3 files (.ex)
error: module Phoenix.LiveView.HTML is not loaded and could not be found
lib/blogapp_web/components/layouts.ex:8: BlogappWeb.Layouts (module)
== Compilation error in file lib/blogapp_web/components/layouts.ex ==
** (CompileError) lib/blogapp_web/components/layouts.ex: cannot compile module BlogappWeb.Layouts (errors have been logged)
This is how my layouts.ex file looks like
defmodule BlogappWeb.Layouts do
@moduledoc """
This module holds different layouts used by your application.
"""
use BlogappWeb, :html
import Phoenix.HTML
import Phoenix.LiveView.HTML -( The error occurs in this line - module Phoenix.LiveView.HTML is not loaded and could not be found. This may be happening because the module you are trying to load directly or indirectly depends on the current module)
embed_templates "layouts/*"
end
You help is deeply appreciated.
First Post!
benwilson512
Author of Craft GraphQL APIs in Elixir with Absinthe
Hi @Alex-Njoroge to answer this sort of question we need some basic information:
- Can you provide the output of
mix deps|grep phoenix, we need to know which versions of Phoenix and Phoenix LiveView are you running. - How did you make the application?
Popular in Questions
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
Hi,
I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
For example for a current url like
http://localhost:4000/cosmetic/products?_utf8=✓&query=perfume&page=2,
I would like to get:
...
New
Hello all!
I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar.
I p...
New
Hi,
I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
I would like to know what is the best IDE for elixir development?
New
Other popular topics
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Hello all!
I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set?
Thanks.
New
Hi all,
I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage.
I’m trying to use Postgres...
New
Hi everyone,
One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
What learn first? Rust or Elixir
Hi Elixir community!
I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this:
...
New
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









