Hello everyone. I’m currently following an Elixir course, and I’ve run into an error stating that the Routes module is undefined. The course I’m following is quite outdated as it was published in 2016. I’ve spent an hour searching for solutions, but I’m still clueless about how to troubleshoot this problem.
Thank you for your reply. I find it hard to understand what does it means by that. Can you help me troubleshoot my problem? I’ve followed the official documentation of Phoenix.HTML in section forms and followed this format.
<%= form_for @changeset, Routes.user_path(@conn, :create), fn f -> %>
Name: <%= text_input f, :name %>
<% end %>
and now, I’ve received this error if I remove the Routes
error: undefined function topic_path/2 (expected DiscussWeb.TopicHTML to define such a function or for it to be imported, but none are available)
lib/discuss_web/controllers/topic_html/new.html.heex:2
If I put it back
UndefinedFunctionError at GET /topics/new
function Routes.topic_path/2 is undefined (module Routes is not available)