thechangelog / changelog.com

Changelog is news and podcast for developers. This is our open source platform.

Home Page:https://changelog.com/posts/changelog-is-open-source

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation failing

saleyn opened this issue · comments

$ mix hex.info
Hex:    0.21.2
Elixir: 1.12.1
OTP:    24.0

Built with: Elixir 1.11.4 and OTP 21.3

Failing to compile dependency phoenix:

$ mix deps.compile
==> phoenix
Compiling 66 files (.ex)

== Compilation error in file lib/phoenix/endpoint/cowboy_websocket.ex ==
** (FunctionClauseError) no function clause matching in :cowboy_websocket_handler.behaviour_info/1    
    
    The following arguments were given to :cowboy_websocket_handler.behaviour_info/1:
    
        # 1
        :optional_callbacks
    
    :cowboy_websocket_handler.behaviour_info/1
    (elixir 1.12.1) lib/module.ex:1321: Module.behaviour_info/2
    (elixir 1.12.1) lib/module.ex:1744: anonymous fn/3 in Module.check_behaviours/2
    (elixir 1.12.1) lib/enum.ex:2356: Enum."-reduce/3-lists^foldl/2-0-"/3
    (elixir 1.12.1) lib/module.ex:1703: Module.check_behaviours_and_impls/4
    (stdlib 3.15) erl_eval.erl:685: :erl_eval.do_apply/6
could not compile dependency :phoenix, "mix compile" failed. You can recompile this dependency with "mix deps.compile phoenix", update it with "mix deps.update phoenix" or clean it with "mix deps.clean phoenix"

Doing deps update didn't help:

$ mix deps.get
$ mix deps.update --all
$ mix deps.compile

Note that checking out latest phoenix as a standalone project (v.1.6.0) builds fine on this system with Erlang/OTP 24.0.

This was a local issue of having ERL_LIBS environment set, which contained a path to a more recent cowboy version, which for some reason was getting on the way of mix deps.compile