5

While compiling a project which use elixir with phoenix web framework, the following compilation error occurs:

==> phoenix_ecto 
Compiled lib/phoenix_ecto.ex 
Compiled lib/phoenix_ecto/plug.ex 
Compiled lib/phoenix_ecto/ison.ex 
==> Compilation error on file lib/phoenix_ecto/html.ex == 
** (CompileError) ib/phoenix_ecto/html.ex:7: unknown key :impl for struct Phoenix.HTML.Form 
(elixir) src/e ixir_map.erl:175: :elixir_map.--assert_struct_keys/5-1c$"011-0--/5 
(elixir) src/e ixir_map.erl:48: :elixir_map.translate_struct/4 
(elixir) src/e ixir_clauses.erl:36: :elixir_clauses.clause/7 
(elixir) src/e ixir_def.erl:178: :elixir_def.translate_clause/7 
(elixir) src/e ixir_def.erl:167: :elixir_def.translate_definition/8 
[31m[1mcould not compile dependency phoenix_ecto, mix compile failed. You can recompile this dependency with 'mix deps.compile phoenix_ecto' or update it with 'mix deps.update phoenix_ecto'

How can I get my project to compile correctly?

Paweł Obrok
  • 22,568
  • 8
  • 74
  • 70
Thant Shwe Aung
  • 656
  • 7
  • 13

3 Answers3

6

You need to update both phoenix_ecto and phoenix_html. Try this:

mix deps.clean phoenix_ecto phoenix_html
mix deps.update phoenix_ecto phoenix_html

And you should hopefully be good to go!

José Valim
  • 50,409
  • 12
  • 130
  • 115
2

I forget to install and compile my application's source code and dependencies with mix do deps.get, compile. I just only install and compile under phoenix directory. Then error emitted like above. After installed and compile under my application. It do well with no error.

Thant Shwe Aung
  • 656
  • 7
  • 13
  • 1
    could you replace the image in your question with the error text? Helps Google with indexing – Raj Jul 31 '15 at 03:45
0

As clearly mentioned in the error message, try:

mix deps.compile phoenix_ecto 
Raj
  • 22,346
  • 14
  • 99
  • 142