Phoenix: Could not compile dependency :ranch

Seems Elixir/Mix is doing it’s job - on mac os:

$ mkdir "Functional Web Development with Elixir, OTP, and Phoenix"
$ cd "Functional Web Development with Elixir, OTP, and Phoenix"
$ mix phx.new hello --no-ecto
$ cd hello
$ mix phx.server
===> Compiling ranch
===> Command ' OTP' not found in namespace bare
** (Mix) Could not compile dependency :ranch, "/Users/dev/.mix/rebar3 bare compile --paths "/Users/dev/sbox/phx/Functional Web Development with Elixir, OTP, and Phoenix/hello/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile ranch", update it with "mix deps.update ranch" or clean it with "mix deps.clean ranch"
$ 

  • It’s commas that cause the problem (not whitespace)
  • It’s a rebar3 issue.
$ mkdir "key,value"
$ cd "key,value"
$ mix phx.new hello --no-ecto
$ cd hello
$ mix phx.server
===> Compiling ranch
===> Command 'value/hello/_build/dev/lib/*/ebin' not found in namespace bare
** (Mix) Could not compile dependency :ranch, "/Users/dev/.mix/rebar3 bare compile --paths "/Users/dev/sbox/phx/key,value/hello/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile ranch", update it with "mix deps.update ranch" or clean it with "mix deps.clean ranch"
$ rebar3 bare compile --paths "/Users/dev/sbox/phx/key,value/hello/_build/dev/lib/*/ebin"
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
$ rebar3 report "bare compile --paths "/Users/dev/sbox/phx/key,value/hello/_build/dev/lib/*/ebin" report"
Rebar3 report
 version 3.3.5+build.3719.ref4725d36
 generated at 2019-06-06T13:31:14+00:00
=================
Please submit this along with your issue at https://github.com/erlang/rebar3/issues (and feel free to edit out private information, if any)
-----------------
Task: bare
Entered as:
  bare compile --paths /Users/dev/sbox/phx/key,value/hello/_build/dev/lib/*/ebin report
-----------------
Operating System: x86_64-apple-darwin18.5.0
ERTS: Erlang/OTP 21 [erts-10.3.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:0] [hipe] [dtrace]
Root Directory: /usr/local/Cellar/erlang/21.3.7/lib/erlang
Library directory: /usr/local/Cellar/erlang/21.3.7/lib/erlang/lib
-----------------
Loaded Applications:
bbmustache: 1.3.0
certifi: 0.4.0
cf: 0.2.2
common_test: 1.17.1
compiler: 7.3.2
crypto: 4.4.2
cth_readable: 1.2.3
dialyzer: 3.3.2
edoc: 0.10
erlware_commons: 1.0.0
eunit: 2.3.7
eunit_formatters: 0.3.1
getopt: 0.8.2
inets: 7.0.7
kernel: 6.3.1
providers: 1.6.0
public_key: 1.6.5
relx: 3.22.2
sasl: 3.3
snmp: 5.2.12
ssl_verify_fun: 1.1.1
stdlib: 3.8.1
syntax_tools: 2.1.7
tools: 3.1

-----------------
Escript path: /usr/local/bin/rebar3
Providers:
  app_discovery as clean compile compile cover ct deps dialyzer do edoc escriptize eunit get-deps help install install_deps list lock new path pkgs release relup report shell state tar tree unlock update upgrade upgrade upgrade version xref 
$ export DEBUG=1
$ rebar3 bare compile --paths "/Users/dev/sbox/phx/key,value/hello/_build/dev/lib/*/ebin"
===> Expanded command sequence to be run: []
===> Expanded command sequence to be run: [{default,app_discovery},
                                                  {bare,compile}]
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: {badmatch,[]}
===> Stack trace to the error location:
[{rebar_prv_bare_compile,do,1,
                         [{file,"/Users/dev/sbox/erl/rb/rebar3/_build/default/lib/rebar/src/rebar_prv_bare_compile.erl"},
                          {line,45}]},
 {rebar_core,do,2,
             [{file,"/Users/dev/sbox/erl/rb/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
              {line,153}]},
 {rebar_prv_do,do_tasks,2,
               [{file,"/Users/dev/sbox/erl/rb/rebar3/_build/default/lib/rebar/src/rebar_prv_do.erl"},
                {line,68}]},
 {rebar_core,do,2,
             [{file,"/Users/dev/sbox/erl/rb/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
              {line,153}]},
 {rebar3,main,1,
         [{file,"/Users/dev/sbox/erl/rb/rebar3/_build/default/lib/rebar/src/rebar3.erl"},
          {line,66}]},
 {escript,run,2,[{file,"escript.erl"},{line,758}]},
 {escript,start,1,[{file,"escript.erl"},{line,277}]},
 {init,start_em,1,[]}]
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
$

You should probably gather and submit similar information for your Ubuntu 19.04 platform.

1 Like