2016-12-26 19 views
0

當我在elixir 1.3.3和phoenix 1.2.1下運行mix phoenix.server時,我得到了這個錯誤:https://github.com/oarrabi/phoenix_facebook_echo_bot不能在Elixir 1.3.3上使用Phoenix 1.2.1

[email protected]:~/elixir/phoenix_facebook_echo_bot$ mix phoenix.server 
==> httpotion 
Compiling 1 file (.ex) 

== Compilation error on file lib/httpotion.ex == 
** (ArgumentError) Access is not a protocol 
    (elixir) lib/protocol.ex:76: Protocol.assert_protocol!/2 
    lib/httpotion.ex:292: (module) 
    (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6 

could not compile dependency :httpotion, "mix compile" failed. You can recompile this dependency with "mix deps.compile httpotion", update it with "mix deps.update httpotion" or clean it with "mix deps.clean httpotion" 

我試圖從照做:myfreeweb/httpotion#87

後來,當我做混合deps.update --all,然後我得到了以下錯誤:

[email protected]:~/elixir/phoenix_facebook_echo_bot$ mix deps.update --all 
Running dependency resolution 

Failed to use "httpotion" (versions 3.0.0 to 3.0.2) because 
    facebook_messenger (versions 0.2.0 and 0.3.0) requires ~> 2.2 
    mix.exs specifies ~> 3.0.0 

Failed to use "poison" (version 2.2.0) because 
    phoenix (version 1.2.1) requires ~> 1.5 or ~> 2.0 
    phoenix_facebook_messenger (versions 0.1.0 and 0.3.0) requires ~> 2.1.0 

** (Mix) Hex dependency resolution failed, relax the version requirements of your dependencies or unlock them (by using mix deps.update or mix deps.unlock). If you are unable to resolve the conflicts you can try overriding with {:dependency, "~> 1.0", override: true} 

請告訴我該怎麼做才能解決這個「循環」問題g依賴性錯誤「?

+0

試試'rm -rf _build && mix compile' –

回答

1

Access是在Elixir 1.0.5之前的protocol。從Elixir 1.1.0開始,Access更改爲behaviour

phoenix_facebook_echo_bot需要HTTPotion版本2反過來後者是建立在藥劑1.0的頂部,期望Access是一個

你運行代碼的唯一簡單的選擇是安裝Elixir v1.0.5並使用它來玩這個包。

另一個選項是克隆包裝,以及facebook_messenger包它涉及上改變他們mix.exs文件,要求HTTPotion版本3`並嘗試運行(我不保證成功。)