【问题标题】:Compilation error on file lib/phoenix_ecto/html.ex文件 lib/phoenix_ecto/html.ex 上的编译错误
【发布时间】:2015-10-21 14:23:48
【问题描述】:

使用 phoenix web framework 编译使用 elixir 的项目时,出现以下编译错误:

==> 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'

我怎样才能让我的项目正确编译?

【问题讨论】:

  • 最好将此 sn-p 粘贴为文本而不是图像。
  • 我会更新我的问题。

标签: web frameworks window elixir phoenix-framework


【解决方案1】:

我忘记使用mix do deps.get, compile 安装和编译我的应用程序的源代码和依赖项。我只是在 phoenix 目录下安装和编译。然后像上面一样发出错误。在我的应用程序下安装并编译后。它做得很好,没有错误。

【讨论】:

  • 能否将问题中的图片替换为错误文本?帮助 Google 编制索引
【解决方案2】:

您需要同时更新 phoenix_ecto 和 phoenix_html。试试这个:

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

希望你一切顺利!

【讨论】:

  • 即使我尝试清理和更新部门,仍然存在上述错误。
【解决方案3】:

正如错误消息中明确提到的,请尝试:

mix deps.compile phoenix_ecto 

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-01-27
    • 1970-01-01
    • 1970-01-01
    • 2023-03-07
    • 2016-12-21
    • 1970-01-01
    • 2019-04-03
    相关资源
    最近更新 更多