erlef / rebar3_hex

Rebar3 Hex library
Apache License 2.0
101 stars 49 forks source link

compilation error when behind proxy #62

Closed mukulashokjoshi closed 7 years ago

mukulashokjoshi commented 7 years ago

Environment: OS - Ubuntu 16.10 Yakkety Yak Elixir - 1.3.4 Erlang/OTP - 19

===> error: function_clause [{string,substr2,
                                 [<<"http://127.0.0.1:3128/">>,1],
                                 [{file,"string.erl"},{line,213}]},
                             {string,substr,3,
                                 [{file,"string.erl"},{line,208}]},
                             {http_uri,split_uri,5,
                                 [{file,"http_uri.erl"},{line,201}]},
                             {http_uri,parse_scheme,2,
                                 [{file,"http_uri.erl"},{line,137}]},
                             {http_uri,parse,2,
                                 [{file,"http_uri.erl"},{line,89}]},
                             {rebar3_hex_http,maybe_setup_proxy,2,
                                 [{file,
                                      "../deps/fs/_build/default/plugins/rebar3_hex/src/rebar3_hex_http.erl"},
                                  {line,122}]},
                             {rebar3_hex_http,maybe_setup_proxy,0,
                                 [{file,
                                      "../deps/fs/_build/default/plugins/rebar3_hex/src/rebar3_hex_http.erl"},
                                  {line,116}]},
                             {rebar3_hex,init,1,
                                 [{file,
                                      "../deps/fs/_build/default/plugins/rebar3_hex/src/rebar3_hex.erl"},
                                  {line,7}]}]
===> Failed creating providers. Run with DEBUG=1 for stacktrace or consult rebar3.crashdump.
** (Mix) Could not compile dependency :fs, "../.asdf/installs/elixir/1.3.4/.mix/rebar3 bare compile --paths "../_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile fs", update it with "mix deps.update fs" or clean it with "mix deps.clean fs"

How to ensure successful compilation behind proxy? Uses CNTLM for proxy

mukulashokjoshi commented 7 years ago

Finally succeeded in compiling by removing the hex.config keys http_proxy and https_proxy as these were resulting in function_clause error in the rebar3_hex

Hex config keys deleted as follows:

mix hex.config http_proxy --delete
mix hex.config https_proxy --delete

So the proxy settings in hex seem not to be required