Updating Erlang/Elixir, mix deps.get results in an error

I have a Phoenix 1.4.6 environment running with:

  • Erlang: 22.3
  • Elixir: 1.9.4

To update the environment and packages incrementally, I first updated Erlang to and Elixir to 1.13.4 in this environment, deleted _build, and recompiled the app. However, when I run mix deps.get, I got the following error:

$ mix deps.get
Resolving Hex dependencies...
** (UndefinedFunctionError) function Logger.__should_log__/1 is undefined or private. Did you mean:

      * __should_log__/2

    (logger 1.13.4) Logger.__should_log__(:debug)
    (hex 2.0.6) lib/hex/solver/solver.ex:169: Hex.Solver.Solver.add_incompatibility/2
    (hex 2.0.6) lib/hex/solver/solver.ex:19: Hex.Solver.Solver.run/4
    (hex 2.0.6) lib/hex/solver.ex:53: Hex.Solver.run/5
    (hex 2.0.6) lib/hex/remote_converger.ex:114: Hex.RemoteConverger.run_solver/5
    (mix 1.13.4) lib/mix/dep/converger.ex:95: Mix.Dep.Converger.all/4
    (mix 1.13.4) lib/mix/dep/converger.ex:51: Mix.Dep.Converger.converge/4
    (mix 1.13.4) lib/mix/dep/fetcher.ex:16: Mix.Dep.Fetcher.all/3

Other commands (such as mix ecto.migrations) work without any issues, and when I create a tarball with distillery, extract it on another server, and run it, everything seems to work fine based on some tests.

Since mix deps.get results in an error, I suspect there might be some incompatible changes in Erlang/Elixir, but I haven’t been able to pinpoint anything relevant so far. What could be the potential issues? Also, how should I narrow down the problem?