简体   繁体   中英

A working example of a project using Rebar3

I am trying to integrate rebar3 into my project, but for some reason, I can't make it find and resolve dependencies when running the app.

Dependencies are downloaded and put in the respective folders in the project and the app compiles without errors, but then functions from dependencies are undefined if I call them from inside the project app or from the Erlang REPL.

I think I am missing some small point, but can't figure out what exactly.

My rebar.config is as simple as this:

{erl_opts, [debug_info]}.
{
  deps, [
  {jsx}
]
}.
{cover_enabled, true}.

The project repo is here .

Can you please share a link to a simple example project where dependencies are present in the rebar.config and are successfully used in the app code?

but then functions from dependencies are undefined if I call them from inside the project app or from the Erlang REPL

In order to load all the dependencies in the REPL, you need to start the REPL using rebar3 shell . rebar3 shell invokes erl with the correct arguments so that the paths of all of the project's dependencies are added to Erlang's Code Path . The command also accepts many flags and arguments; you can see the full list and description by running rebar3 help shell .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM