"mix phoenix.server" throwing "module Phoenix.HTML is not loaded and could not be found"

469 views
Skip to first unread message

Keerthy

unread,
May 26, 2015, 3:29:17 AM5/26/15
to phoeni...@googlegroups.com
Hi,

I created a new app
mix phoenix.new info_circle

and then running mix phoenix.server results in -
== Compilation error on file web/views/layout_view.ex ==
** (CompileError) web/views/layout_view.ex:2: module Phoenix.HTML is not loaded and could not be found
    (elixir) expanding macro: Kernel.use/1
    web/views/layout_view.ex:2: InfoCircle.LayoutView (module)
    expanding macro: InfoCircle.Web.__using__/1
    web/views/layout_view.ex:2: InfoCircle.LayoutView (module)
    (elixir) expanding macro: Kernel.use/2
    web/views/layout_view.ex:2: InfoCircle.LayoutView (module)

Tried mix deps.clean --all, mix deps.get, mix deps.compile but doesn't fix that.

Generated mix.exs has the following
defp deps do
    [{:phoenix, "~> 0.12"},
     {:phoenix_ecto, "~> 0.3"},
     {:postgrex, ">= 0.0.0"},
     {:phoenix_live_reload, "~> 0.3"},
     {:cowboy, "~> 1.0"}]
  end

Tried upgrading to 0.13 but having the same issue. Can someone let me know how to verify if the phoenix dependencies and modules are setup correctly?

Thanks.

Chris McCord

unread,
May 26, 2015, 5:07:08 AM5/26/15
to phoeni...@googlegroups.com
You need phoenix_html ~> 1.0 in your reps. Give that a shot and report back. Also be sure to check the upgrade guides that we link in the changelog if upgrading from previous versions.

--
You received this message because you are subscribed to the Google Groups "phoenix-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phoenix-talk...@googlegroups.com.
To post to this group, send email to phoeni...@googlegroups.com.
Visit this group at http://groups.google.com/group/phoenix-talk.
To view this discussion on the web visit https://groups.google.com/d/msgid/phoenix-talk/9b4cdf01-7cf6-4630-8623-a19fabd9f4f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ஸ்ரீராம் கீர்த்தி

unread,
May 26, 2015, 3:56:36 PM5/26/15
to phoeni...@googlegroups.com
Thanks Chris. Adding phoenix_html ~> 1.0 to my deps fixed this issue.

And this issue happens in 0.12, even before trying to upgrade phoenix to 0.13. The target 'mix phoenix.new' seems to create a broken project, with phoenix_html missing by default.

Reply all
Reply to author
Forward
0 new messages