【发布时间】:2018-01-20 23:55:35
【问题描述】:
我在运行 mix deps.compile 时收到错误 Package unicode_util_compat-0.3.1 not found; Updating package registry; Uncaught error in rebar_core 错误。根据https://hex.pm/packages/unicode_util_compat 的描述,unicode_util_compat 似乎不支持我正在使用的 Erlang 20。我可以做些什么来让 mix deps.compile 在不降级到 Erlang 19 的情况下正常工作?
DEBUG=1的控制台输出如下
===> Compiling unicode_util_compat
===> run_hooks("e:/Data/elixir-stuff/fin_reporting/deps/unicode_util_compat", pr
e_hooks, compile) -> no hooks defined
===> run_hooks("e:/Data/elixir-stuff/fin_reporting/deps/unicode_util_compat", pr
e_hooks, erlc_compile) -> no hooks defined
===> erlopts [debug_info,debug_info,{d,'OTP20'}]
===> files to compile ["e:/Data/elixir-stuff/fin_reporting/deps/unicode_util_com
pat/src/unicode_util_compat.erl"]
===> Compiled unicode_util_compat.erl
===> run_hooks("e:/Data/elixir-stuff/fin_reporting/deps/unicode_util_compat", po
st_hooks, erlc_compile) -> no hooks defined
===> run_hooks("e:/Data/elixir-stuff/fin_reporting/deps/unicode_util_compat", pr
e_hooks, app_compile) -> no hooks defined
===> run_hooks("e:/Data/elixir-stuff/fin_reporting/deps/unicode_util_compat", po
st_hooks, app_compile) -> no hooks defined
===> run_hooks("e:/Data/elixir-stuff/fin_reporting/deps/unicode_util_compat", po
st_hooks, compile) -> no hooks defined
===> Expanded command sequence to be run: []
===> Expanded command sequence to be run: [{default,app_discovery},
{bare,compile}]
===> Package unicode_util_compat-0.3.1 not found. Fetching registry updates and
trying again...
===> Updating package registry...
===> Fetching registry from "https://repo.hex.pm:443/registry.ets.gz?"
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult
rebar3.crashdump
===> Uncaught error: {badmatch,
{error,{rebar_prv_update,package_index_download}}}
===> Stack trace to the error location:
[{rebar_packages,handle_missing_package,3,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src
/rebar_packages.erl"},
{line,85}]},
{rebar_app_utils,update_source,3,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/sr
c/rebar_app_utils.erl"},
{line,262}]},
{rebar_app_utils,dep_to_app,7,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/sr
c/rebar_app_utils.erl"},
{line,228}]},
{rebar_app_utils,'-parse_deps/6-lc$^0/1-0-',6,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/sr
c/rebar_app_utils.erl"},
{line,129}]},
{rebar_app_discover,'-do/2-fun-0-',3,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar
/src/rebar_app_discover.erl"},
{line,41}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
{rebar_app_discover,do,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar
/src/rebar_app_discover.erl"},
{line,37}]},
{rebar_prv_app_discovery,do,1,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/
rebar/src/rebar_prv_app_discovery.erl"},
{line,38}]}]
===> When submitting a bug report, please include the output of `rebar3 report "
your command"`
** (Mix) Could not compile dependency :idna, "escript.exe "c:/Users/I805649/.mix
/rebar3" bare compile --paths "e:/Data/elixir-stuff/fin_reporting/_build/dev/lib
/*/ebin"" command failed. You can recompile this dependency with "mix deps.compi
le idna", update it with "mix deps.update idna" or clean it with "mix deps.clean
idna"
【问题讨论】:
-
“for Erlang unicode_util,因为 Erlang 20 已经包含该模块。您可以尝试将
DEBUG设置为1并发布输出吗? (在 *nix 中,这将是DEBUG=1 mix deps.compile --all,不确定 Windows。) -
哇,我从没想到这就是
-
请看上面添加的stacktrace。谢谢。
-
从 github 重新安装 rebar3 解决了这个问题。谢谢 Dogbert。