无法向 rebar3 配置添加依赖项

问题描述 投票:0回答:1

我在添加依赖项时遇到问题(我使用 rebar3 进行编译)。

例如,我想使用 jsx (也尝试过 jimmy 和其他一些),所以我在 rebar.config 中添加了以下几行(正如 github 上针对该项目所述):

{deps, [
       ...
       {jsx, "~> 3.0"}
]}

但是当编译并运行应用程序时我得到:

** exception error: undefined function jsx:is_json/1

我还尝试将 jsx 添加到 myapp.app.src

    {applications, [
        kernel,
        stdlib,
        jsx
    ]},

我检查了https://www.rebar3.org/docs/configuration/dependency/上描述的不同组合,但仍然有相同的错误。

当我编译我的应用程序时,我什至没有得到某些部门正在获取的信息,只是:

rebar3 compile 
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling parser

你现在知道我在添加其他模块时错过了什么吗?

erlang rebar3
1个回答
0
投票

这是请求的命令运行的输出:

===> Expanded command sequence to be run: [app_discovery,install_deps,lock,compile]
===> Running provider: app_discovery
===> Found top-level apps: [parser]
    using config: [{src_dirs,["src"]},{lib_dirs,["apps/*","lib/*","."]}]
===> Running provider: install_deps
===> Verifying dependencies...
===> Running provider: lock
===> Running provider: compile
===> Compile (apps)
===> Running hooks for compile with configuration:
===>    {pre_hooks, []}.
===> Compile (project_apps)
===> Running hooks for compile in app parser (/home/user/erlang/myapp) with configuration:
===>    {pre_hooks, []}.
===> Running hooks for erlc_compile in app parser (/home/user/erlang/myapp) with configuration:
===>    {pre_hooks, []}.
===> Analyzing applications...
===> Compiling parser
===> compile options: {erl_opts, [debug_info]}.
===> files to analyze ["/home/user/erlang/myapp/src/myapp.erl"]
===> Running hooks for erlc_compile in app parser (/home/user/erlang/myapp) with configuration:
===>    {post_hooks, []}.
===> Running hooks for app_compile in app parser (/home/user/erlang/myapp) with configuration:
===>    {pre_hooks, []}.
===> Running hooks for app_compile in app parser (/home/user/erlang/myapp) with configuration:
===>    {post_hooks, []}.
===> Running hooks for compile in app parser (/home/user/erlang/myapp) with configuration:
===>    {post_hooks, []}.
===> Running hooks for compile with configuration:
===>    {post_hooks, []}.
© www.soinside.com 2019 - 2024. All rights reserved.