2016-06-21 252 views
2

錯誤如「Phoenix.HTML.Engine.init/1未定義或私有」和「Plug.Conn .__結構__/1未定義」。當我想開始我的鳳凰應用與mix phoenix.server我得到了錯誤:我升級到Elixir 1.3後升級Elixir

== Compilation error on file web/views/page_view.ex == 
** (UndefinedFunctionError) function Phoenix.HTML.Engine.init/1 is undefined or private 

試圖通過升級庫,來修正它,我還有其他的類似錯誤:

** (CompileError) lib/poison/parser.ex:11: Poison.SyntaxError.__struct__/1 is undefined, cannot expand struct Poison.SyntaxError 

== Compilation error on file lib/plug/test.ex == 
** (CompileError) lib/plug/test.ex:53: Plug.Conn.__struct__/1 is undefined, cannot expand struct Plug.Conn 
    (stdlib) lists.erl:1353: :lists.mapfoldl/3 

有什麼建議嗎?

回答

3

什麼似乎解決它,我被強迫依賴於編譯:

mix deps.compile --force 

如果你嘗試運行測試時錯誤,請嘗試:

MIX_ENV=test mix deps.compile --force