Error in compiling Erlang project with Rebar3

Hi All, I am getting error while compiling rebar3. I have complete source code for mqtt_client application and mosquitto server is running in my machine. Below is error display:

\rebar3\erl.mqtt.client>rebar3 compile
‘rebar3’ is not recognized as an internal or external command,
operable program or batch file.

You need to install rebar3 and make sure it’s available in PATH.

There is a red box under “installing Erlang” explaining installation for Windows users.

2 Likes

I am able to compile my project after setting path. Thank you.
I am getting below error while starting my application, could please share the thoughts

Eshell V10.5 (abort with ^G)
1> application:start(mqtt_client).
=CRASH REPORT==== 4-Jan-2020::21:51:57.068000 ===
crasher:
initial call: application_master:init/4
pid: <0.79.0>
registered_name: []
exception exit: {bad_return,
{{mqtt_client,start,[normal,[{vsn,“1.0.3”}]]},
{‘EXIT’,
{undef,
[{lager,start,[],[]},
{mqtt_client,start,2,
[{file,
“f:/Software/MQTT_Client_IOT/rebar3/erl.mqtt.client/src/mqtt_client.erl”},
{line,250}]},
{application_master,start_it_old,4,
[{file,“application_master.erl”},{line,277}]}]}}}}
in function application_master:init/4 (application_master.erl, line 138)
ancestors: [<0.78.0>]
message_queue_len: 1
messages: [{‘EXIT’,<0.80.0>,normal}]
links: [<0.78.0>,<0.43.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 610
stack_size: 27
reductions: 232
neighbours:

{error,
{bad_return,
{{mqtt_client,start,[normal,[{vsn,“1.0.3”}]]},
{‘EXIT’,
{undef,
[{lager,start,[],[]},
{mqtt_client,start,2,
[{file,
“f:/Software/MQTT_Client_IOT/rebar3/erl.mqtt.client/src/mqtt_client.erl”},
{line,250}]},
{application_master,start_it_old,4,
[{file,“application_master.erl”},{line,277}]}]}}}}}
2> =INFO REPORT==== 4-Jan-2020::21:51:57.074000 ===
application: mqtt_client
exited: {bad_return,
{{mqtt_client,start,[normal,[{vsn,“1.0.3”}]]},
{‘EXIT’,
{undef,
[{lager,start,[],[]},
{mqtt_client,start,2,
[{file,
“f:/Software/MQTT_Client_IOT/rebar3/erl.mqtt.client/src/mqtt_client.erl”},
{line,250}]},
{application_master,start_it_old,4,
[{file,“application_master.erl”},
{line,277}]}]}}}}
type: temporary

You miss to start the dependencies, please use ensure_started/1 or how it was called to start the full dependency tree.

PS: perhaps you should also tell us which Matt client you are working with.