【发布时间】:2016-12-27 00:03:57
【问题描述】:
当我在 elixir 1.3.3 和 phoenix 1.2.1 下运行 mix phoenix.server 时,我得到了这个错误:
paul@learning:~/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 时,我得到以下错误:
paul@learning:~/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}
请告知我应该如何解决这个“循环依赖错误”?
【问题讨论】:
-
试试
rm -rf _build && mix compile
标签: facebook elixir phoenix-framework