【问题标题】:Package unicode_util_compat-0.3.1 not found; Uncaught error in rebar_core找不到包 unicode_util_compat-0.3.1; rebar_core 中未捕获的错误
【发布时间】: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。

标签: erlang elixir rebar


【解决方案1】:

您也可以通过mix local.rebar在本地更新/重新安装rebar(和rebar3)

【讨论】:

    猜你喜欢
    • 2014-10-09
    • 2019-01-17
    • 2013-01-12
    • 1970-01-01
    • 2020-10-02
    • 2020-11-10
    • 2021-12-03
    • 2020-04-21
    相关资源
    最近更新 更多