Earl

Earl

Module not loaded/could not be found

I generated a context for a basic project, updated a few things in my router, created a live file for my liveviews and ran into this error


== Compilation error in file lib/wishlist_web/templates/live/show_live.ex ==
** (CompileError) lib/wishlist_web/templates/live/show_live.ex:2: module WishListWeb 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     
    (elixir 1.12.3) expanding macro: Kernel.use/2
    lib/wishlist_web/templates/live/show_live.ex:2: WishListWeb.ShowLive (module)

router

  scope "/admin", WishlistWeb do
    pipe_through :browser

    live "/edit", EditLive, :root
  end

edit_live.ex (excluding mount and render b/c i know that can’t be the issue.)

defmodule WishListWeb.EditLive do
  use WishListWeb, :live_view

i tried recompiling, deleting _build, and even recreating the project, based off similar issues i found online. Could you point me in the right direction?

Most Liked

03juan

03juan

What is the module name in your lib/wishlist_web.ex file?

You should probably be using WishlistWeb, not WishListWeb in your EditLive and ShowLive modules.

Reason I’m assuming it this way is that Phoenix will name the file with module MyAppWeb as my_app_web.ex, it converts CamelCase names to came_case files.

i.e.

trisolaran

trisolaran

I see a typo in your router file. “WishlistWeb” instead of “WishListWeb”.

Where Next?

Popular in Questions Top

chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
New
nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
jason.o
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
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
yawaramin
In the Dialyzer docs ( dialyzer — OTP 29.0.2 (dialyzer 6.0.1) ), there is a way to turn off a specific warning for a function: -dialyzer...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
dokuzbir
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
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement