Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Recovery Strategies

Compilation Failures

Strategy: Fix source code, recompile

Incremental: Only failed files recompile

Clean Build:

rebar3 clean
rebar3 compile

Dependency Issues

Update Registry:

rebar3 update

Unlock Dependency:

rebar3 unlock DEPNAME
rebar3 compile

Clear Dependency Cache:

rm -rf _build/default/lib/DEPNAME
rebar3 compile

Configuration Errors

Validate Syntax:

erl -eval "file:consult(\"rebar.config\")." -noshell -s init stop

Check Profile Format:

% Correct:
{profiles, [{test, [{deps, [meck]}]}]}.

% Incorrect:
{profiles, [{test, {deps, [meck]}}]}.  % Not a list!

DAG/Cache Issues

Clear DAG Cache:

rm -rf _build/default/.rebar3/
rebar3 compile

Clear All Caches:

rm -rf _build/
rm -rf ~/.cache/rebar3/
rebar3 compile

Network Issues

Offline Mode (use only cached):

rebar3 compile --offline

Retry with Timeout:

% In ~/.config/rebar3/rebar.config:
{hex, [{http_timeout, 300000}]}.  % 5 minutes